Repository navigation
S2 — Close what is already fixed, and make register closing conditions machine-checkable (C-43, C-59, C-61) #183
Description
Part of epic #181. Closes register C-43 (Tier 2), C-59 (Tier 3), C-61 (Tier 3) — Cluster K.
Background
Three register entries are filed Open while their own stated closing conditions are met.
C-43 says, in its own words:
"C-43 closes when
tests/test_gaul_lookup_fidelity.pyis committed and green — the entry should then cite the test, not the session."
The file is committed. pytest -q tests/test_gaul_lookup_fidelity.py → 18 passed.
C-59 and C-61 each say "Mitigation — landed 2026-07-31" and name four specific tests. All four exist:
| test | present |
|---|---|
test_builder_rejects_a_duplicate_gid |
yes |
test_lookup_key_is_unique |
yes |
test_a_sentinel_code_is_dropped_rather_than_shipped |
yes |
test_lookup_carries_no_sentinel_codes |
yes |
And the code matches: scripts/build_gaul_lookup.py has zero bare assert statements and four LookupBuildError raises, including the index-uniqueness guard C-59 asked for.
This is the fourth and fifth instance of the same drift class in one day — C-63 and C-47 were found the same way during review-rr strategic, and both were also filed Open with their defects fixed. tests/test_register_integrity.py cannot catch any of them: it validates headings, counts, ID uniqueness, cross-reference resolution and section placement. It has no opinion about whether the code matches the claim.
The register's failure mode is stale-open, not stale-closed — which is the safer direction, but it inflates the open count with finished work and makes prioritisation lie.
Separately: Cluster M's header says "Five open concerns"; its body lists six. C-58 was added on 2026-08-01 and the heading was not updated.
Work
Part 1 — move the three entries. C-43, C-59, C-61 from ## Open Concerns to ## Resolved Concerns, each:
- retitled with the
— RESOLVEDsuffix the section's convention uses - citing the test, not the session, exactly as C-43 instructed
- keeping the scope paragraph C-43 already carries — transcription fidelity is proven, assignment correctness is views-datafactory#387 and is not this repo's to close. That distinction must survive the move; it is the whole reason C-43 stayed open after the forward-check.
- Cluster K updated with a closure note in the style of Cluster L's
Part 2 — fix Cluster M's heading. "Five" → "Six". Header counts updated.
Part 3 — make this class machine-checkable. Extend tests/test_register_integrity.py with a check that an entry under ## Open Concerns does not state a closing condition that is already satisfied.
The tractable, non-clever form: entries that name a test file as their closing condition use a recognisable phrase (closes when \tests/...`, Mitigation — landed`). Parse those, and assert either that the named path does not exist, or that the entry is not in the Open section. That is narrow and mechanical — it detects exactly the shape that occurred three times, and it will not fire on entries whose closing condition is prose.
Where the phrasing is ambiguous, prefer a false negative over a false positive: a guard that cries wolf gets deleted, and this repo has already deleted one over-fragile test this week for exactly that reason (C-61's -1 monkeypatch).
Acceptance criteria
- C-43, C-59, C-61 appear only under
## Resolved Concerns, each citing the test that discharges it. - C-43's transcription-fidelity-vs-assignment-correctness scope paragraph survives verbatim, with views-datafactory#387 still cited.
- Cluster K carries a closure note; Cluster M's heading says six.
- Header counts arithmetically correct: total unchanged at 73, open 24 → 21, resolved 49 → 52.
- The new integrity check exists and is mutation-tested: fed C-43's actual pre-fix text (Open + the test file present) it must fail. A guard that passes on the bug it was written for is decoration — this repo has a standing practice of proving guards bite (
test_clone_readiness.py::test_the_guard_would_actually_catch_a_violation).
Testing
pytest -q tests/test_register_integrity.py # all 8 existing + the new one
pytest -q tests/test_gaul_lookup_fidelity.py # 18 passed — the evidence being cited
pytest -q
Mutation test, run manually and reported in the PR:
# temporarily restore C-43 to Open, keep the test file present -> the new check must FAIL
Dependencies
None. Register + one test file. No production code.
Note for S9: this story establishes the closing-condition convention; every later story in the epic must write its register disposition in a form this check understands.
Files
reports/technical_risk_register.md— C-43 (:368), C-59 (:516), C-61 (:560), Cluster K, Cluster M, headertests/test_register_integrity.py— the new checktests/test_gaul_lookup_fidelity.py— the evidence, unchangedscripts/build_gaul_lookup.py:152-183— the fourLookupBuildErrorraises, unchanged
Activity
chore(register): S2 #183 — close Cluster K's three finished entries, …
Polichinel commentedon Aug 1, 2026
Landed in #194.
C-43, C-59 and C-61 moved to Resolved, each citing the test rather than the session. C-43's transcription-fidelity-vs-assignment-correctness scope split preserved verbatim, with views-datafactory#387 still carrying the half this repo cannot close.
Two new checks in
test_register_integrity.py, mutation-proven against the real 2026-08-01 register — both fail on it, namingC-43 -> tests/test_gaul_lookup_fidelity.pyand['C-59','C-61']; restored, 10 pass.Review narrowed
_ARTIFACT_ROOTStotests/andscripts/: includingdocs/would have fired on correctly-open entries, and C-62's "closes when C-44's bump becomes takeable…torch…" showed the margin was thin.Register: 74 concerns, 22 open, 52 resolved. Cluster K mostly closed; Cluster M heading corrected to six.