main
md 44 lines 2.14 KB
Rendered Raw
1 # state_monitor_integration.py DOX
2
3 ## Purpose
4
5 - Own the `state_monitor_integration.py` helper module.
6 - This module bridges dirty-state calls into the shared state monitor.
7 - Keep this file-level DOX profile synchronized with `state_monitor_integration.py` because this directory is intentionally flat.
8
9 ## Ownership
10
11 - `state_monitor_integration.py` owns the runtime implementation.
12 - `state_monitor_integration.py.dox.md` owns durable notes about responsibilities, contracts, side effects, and verification for that implementation.
13 - Top-level functions:
14 - `mark_dirty_all(reason: str | None=...) -> None`
15 - `mark_dirty_for_context(context_id: str, reason: str | None=..., include_collections: bool=...) -> None`
16
17 ## Runtime Contracts
18
19 - Helper modules own reusable framework APIs and must preserve public callers unless all callers, tests, and docs are updated together.
20 - Update this file whenever public functions, classes, persistence behavior, path/security assumptions, side effects, or cross-module contracts change.
21 - Observed side-effect areas: settings/state persistence.
22 - Imported dependency areas include: `__future__`.
23
24 ## Key Concepts
25
26 - Important called helpers/classes observed in the source: `get_state_monitor.mark_dirty_all`, `get_state_monitor.mark_dirty_for_context`, `get_state_monitor`.
27 - Global dirty waves always include context/task collections; high-frequency context-local owners may explicitly omit them when their mutation cannot change collection metadata.
28 - Keep request/response, tool, or helper semantics documented here at the same time as source changes.
29
30 ## Work Guidance
31
32 - Preserve public helper APIs used by core code and plugins unless every caller is updated.
33 - Keep path, auth, secret, persistence, network, and subprocess behavior explicit and bounded.
34 - Prefer adding cohesive helper functions here only when behavior is reused across modules.
35
36 ## Verification
37
38 - Run targeted tests for changed helper behavior; run security regressions for auth, filesystem, WebSocket, tunnel, upload, or secret-handling helpers.
39 - Related tests observed by source search:
40 - `tests/test_model_config_api_keys.py`
41
42 ## Child DOX Index
43
44 No child DOX files.