Guard every delete verdict in its own document, not just the preprint - #20
Guard every delete verdict in its own document, not just the preprint#20aurascoper wants to merge 1 commit into
Conversation
test_no_deleted_claim_survives_in_the_manuscript filtered on
claim_id.startswith("PP-") and read only the preprint, so all 25 `delete`
verdicts reached on other documents were carried by a test that searched a
file those claims had never been in. For them it could not fail: rule 1.
Scope now comes from the `document` column each row already declares.
DOCUMENT_ALIASES maps the two preprint aliases and README to paths;
`repository` and `correspondence` are declared pseudo-documents, and
test_every_deleted_claim_names_a_document_the_guard_can_read fails on any
other unreadable document so a typo or a rename cannot retire a verdict in
silence. Renamed the guard to ..._in_the_document_it_names, since it no
longer reads the manuscript alone.
Negative controls, both run:
- test_the_guard_detects_the_handout_claims requires HANDOUT-02 to be
found in the pre-correction handout at 9319d43.
- Reintroducing "heat/azide-killed biomass is standard in this
literature" into the working copy made the survivor test fail with
exactly that row; reverted.
The manuscript floor of 18 detections is unchanged, measured 20.
HANDOUT-02's claim_text was a paraphrase nothing could match, and now
quotes the handout. HANDOUT-01 stays undetectable for a different reason:
its claim is an equation, and normalise_markup reduces LaTeX maths to a
bare `x`. It is printed in the coverage report as needing a human rather
than counted as covered.
Also fixes the scope HANDOUT-01 recorded. The boxed X_max = q_max*rho_dry
is still on page 3 deliberately, reframed under "Where the number would
land"; the row read as if that arithmetically-correct unit conversion had
to vanish. The verdict is on the Langmuir term inside the box labelled THE
SOLVER and on the framing of the conversion as a bridge into it.
The handout's own corrections: sorption node shows the shipping Henry term,
azide dropped as a metabolic control, "The bridge" heading requalified.
Ledger: LEDGER-GUARD-03 added; the "ENFORCEMENT GAP, NAMED NOT CLOSED"
note on HANDOUT-01 corrected forward. Stale "30 of 34" coverage claims
updated in the module docstring and README.
calibration: 362 passed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F4m1NqS1u9tuDRaqmNoQap
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f1522ebd72
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| unreadable = sorted({r["document"] for r in deleted_rows(rows) | ||
| if (lambda q: q is None or not q.is_file())( | ||
| document_path(r["document"]))} |
There was a problem hiding this comment.
Exempt generated artifacts from existence checks
On a fresh checkout, artifacts/ is gitignored and neither pilot JSON exists, so this new check always reports artifacts/pilot/openmc_nested_pilot_budget.json as unreadable; the broadened existence check below also rejects the missing verdict JSON. The calibration-unit workflow does not generate either artifact before running pytest, meaning the required calibration suite now fails consistently. Resolve these ledger rows through committed fixtures or otherwise distinguish generated outputs from missing source documents.
AGENTS.md reference: AGENTS.md:L129-L137
Useful? React with 👍 / 👎.
Stacked on #19. Base is
feat/slab-depth-geometryrather thanmasterbecausepreprint/wan_meeting_handout.texand theHANDOUT-*ledger rows arrive in9319d43, which is on that branch. Shares no files with #19's nine commits.The hole
test_no_deleted_claim_survives_in_the_manuscriptfiltered onclaim_id.startswith("PP-")and read only the preprint. The ledger carries 59deleteverdicts across 17 documents; 34 are the manuscript's. The other 25 —HANDOUT-01andHANDOUT-02among them — were guarded by a test that searcheda file those claims had never been in. For them it could not fail. Rule 1.
The fix
Scope comes from the
documentcolumn each row already declares.DOCUMENT_ALIASESmaps the two preprint aliases andREADMEto paths;repositoryandcorrespondenceare declared pseudo-documents. Renamed totest_no_deleted_claim_survives_in_the_document_it_names, since it no longerreads the manuscript alone.
test_every_deleted_claim_names_a_document_the_guard_can_readfails on anyother unreadable document, so a typo or a rename cannot retire a verdict in
silence. It caught
correspondenceon the first run.Negative controls, both run
test_the_guard_detects_the_handout_claimsruns the guard against thepre-correction handout at
9319d43and requiresHANDOUT-02to be found.heat/azide-killed biomass is standard in this literatureintothe working copy made the survivor test fail naming exactly that row; reverted.
Coverage is still partial, and still named
HANDOUT-02'sclaim_textwas a paraphrase nothing could match, and now quotesthe handout.
HANDOUT-01stays undetectable for a different reason: its claim isan equation, and
normalise_markupreducesX_{\max}to a barex. Aprose-phrase guard cannot check a formula, so it is printed in the coverage
report as needing a human rather than counted as covered. Extending the
normaliser to keep maths would have moved the manuscript's detection floor for
one row.
One scope error found in the ledger while checking
HANDOUT-01'sclaim_textlumped the arithmetically-correct unit conversionX_max = q_max * rho_drytogether with the false implementation claim. Readliterally, the
deleteverdict said that equation had to vanish — but it isstill on page 3 deliberately, reframed under "Where the number would land" and
above the sentence saying there is no
X_maxin the code for it to enter. Therow now states its scope: the Langmuir term inside the box labelled THE SOLVER,
and the framing of the conversion as a bridge into it.
The
ENFORCEMENT GAP, NAMED NOT CLOSEDnote on that row is corrected forward,LEDGER-GUARD-03added, and the stale "30 of 34" coverage claims updated in themodule docstring and
README.md.Known dependency
HANDOUT_COMMIT = "9319d43"pins a commit. Safe under this repository's mergestyle —
5980dc5is still reachable frommasterand #4–#11 are merge commits —but a squash-merge of #19 would turn that control into a skip, which rule 2 says
to read as uncovered surface rather than a pass.
Verification
cd calibration && ../coupling/.venv/bin/pytest -q tests— 362 passed, on thisbranch's base.
🤖 Generated with Claude Code
https://claude.ai/code/session_01F4m1NqS1u9tuDRaqmNoQap