<!-- Authored per the the-loop:writing skill. -->
Tasks: four test_instance.py tests read the machine they run on
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: the bug first, the parity second, so the parity fix is not what hides the next divergence.
- [x] A0 — reproduce, and pin the negative control. Run the four tests in all four rows of the ticket's table on
main; confirm 4 failed / 59 passed in three of them. AC: AC1 · Test: T5. - [x] A1 — pin the lookup where the defect is.
cli/tests/test_instance.pygains the autouse_no_ambient_cli_configfixture, setting$THE_LOOP_CLI_CONFIGto an uncreated path under the test's owntmp_path, sodefault_cli_config_path()and_cli_config_export()still run for real and find nothing. AC: AC1 · Test: T1, T11. - [x] A2 — establish the scope by trying the wider one. The same fixture in
cli/tests/conftest.py, suite-wide, then run T2. It fails 14 tests whose state root is anchored on the config path; revert to A1 and record why inbugfix.md§ Defect 1 andevidence/verification.md. AC: AC1 · Test: T2. - [x] B1 — make the Makefile's parity claim true.
test:becomescd cli && uv run python -m pytest -q, byte-for-byte the pre-commitpytesthook's entry; a# CI parity:comment says why thecdis part of the command; the header RULE is narrowed from "all scripts run from the project root" to invocation, naming the exception. Deps: A1 (the ticket's order) · AC: AC2, AC3 · Test: T4. - [x] C1 — docs.
docs/capabilities/testing-and-contracts.mdgains the standing rule (a test pins or controls what it resolves; a cwd-relative lookup is not ambient in itself and is not pinned wholesale; aMakefileparity claim includes the working directory) and a history row. Deps: A1, B1 · Test: T4 (markdownlint viamake lint). - [x] D1 — evidence.
verification.md(all matrix rows with raw output, including the rejected suite-wide variant),self-review.md,security-review.md,documentation.md,reviewer-briefing.md. Deps: A1–C1.