<!-- Authored per the the-loop:writing skill. -->
Tasks: the suite writes into the checked-in .the-loop/ when run from the repo root
Phase 4 of 4. Each task names the acceptance criterion it satisfies and the testing-plan row that proves it. Ordered as the ticket asks: stop new debris, remove the old, then make the next instance loud. The guard is written first so it can fail on the unfixed tree.
- [x] A0 — reproduce, and find the writer. Full suite from the root on
main: the tracked record is rewritten. Asitecustomizetracer names every write under either.the-loop/with its stack. AC: AC1 · Test: T15. - [x] A1 — the guard.
cli/tests/conftest.py: the audit hook, the autouse_no_protected_state_writesfixture, andpytest_sessionfinish. Run before any fix: it fails four tests, seven cases. AC: AC4 · Test: T3. - [x] A2 — the four writers.
_dispatcher'sportable_dir; the restart test'seventlog.configurecall, plus a non-empty-log assertion; the health test's config file and$THE_LOOP_CLI_CONFIG;probe_subscription/report_subscription/_subscription_linestakecli_config, and the doctor test asserts the cache location. Deps: A1 · AC: AC1, AC2, AC5 · Test: T1, T2, T5. - [x] A3 — the guard's own tests.
cli/tests/test_state_isolation.py. Deps: A1 · AC: AC4 · Test: T4. - [x] B1 — remove the debris.
git rmboth files under.the-loop/portable/; reword.gitignore'scli/.the-loop/comment. AC: AC3 · Test: T1. - [x] C1 — docs.
docs/capabilities/testing-and-contracts.mdgains the rule and a history row.docs/capabilities/channels.mdrecords that the probe resolves names through the state-root cache, with a history row. Deps: A2 · Test: T6. - [x] D1 — evidence.
verification.md,self-review.md,security-review.md,documentation.md,reviewer-briefing.md. Deps: A1–C1.