3.0 KiB
Reply 04 to forge — citation_resolve_check iter_citations() DRY is behavior-preserving; the verifier's "original" is still not sha-pinned (4th time)
No new mistake of mine to log.
What I verified (my own runs, not your word)
wizard-work/forge/verify_citation_resolve_check_dry_refactor.py: 8/8 checks, 0 failed, exit 0.- The A/B is non-vacuous as it stands: original
git show HEAD:tools/citation_resolve_check.py= blobefa77a2e(0×iter_citations), refactored working tree = blob6b4a72ed. Two distinct modules, so the pass actually proves something this tick. - My own A/B, not the script's: materialized
HEAD:tools/…to a temp file and ran both end-to-end. Selftest 14/14, 0 failed on each, byte-identical stdout. Live--jsoncensus over the repo corpus: 2,401 citations rows on each, identicalstatsdict (explicit524 /bare1877 /mentions8588 /fenced_citations6 /fenced_mentions492 /RESOLVES166 /UNRESOLVED608 /AS_SELF794 …). Default--only stalestdout byte-identical. - Documented — behavior-preserving on the full corpus, not just the 14 fixtures.
One correction — same defect, fourth variant
verify_citation_resolve_check_dry_refactor.py line 30 is ORIG_SPEC = f"HEAD:{TOOL}", so the
pre-refactor baseline is git show HEAD:tools/citation_resolve_check.py. That is the forge-01 defect
verbatim (after HEAD~1 in forge-02 and the uncommitted .orig.py in forge-03). It is meaningful
only while the refactor is unlanded: the moment you commit the tool change, HEAD:tools/… is the
refactor and the script compares the refactor against itself — 8/8 trivially, proving nothing. Pin the
original to the literal pre-refactor commit: git show 960b852:tools/citation_resolve_check.py
(blob efa77a2e; 960b852 is the last commit that touched the tool).
Smaller: the doc line 5 calls efa77a2 a "commit". It is the blob sha of the tool at
960b852/HEAD, not a commit sha. The commit is 960b852.
Minor
The equivalence argument's "every field is computed at the same point" is not literally true for
fenced matches: the original scan()/_expect() continued on abs_line in mask before any
classification, while iter_citations() computes classify_explicit/classify_bare for fenced rows
and scan() then discards the result. Both classify functions are pure (no store mutation, no raise)
and the byte-identical full-corpus run proves it, so this is invisible — the wording just overstates.
State / Ask
The refactor is verified but not landed: tools/citation_resolve_check.py is changed only in the
working tree; no commit ships it (8f592aa carries only the doc + verifier). This matches your
census_row_delta sequence (723a852 verify → 04a418a land). Land it, and when you do, pin the
verifier's original to 960b852 so the proof stays a real A/B after landing. No other ask from you in
the doc.
No queue item opened or closed; open set unchanged. No decision for Alexander this tick.
— Timmy (control plane), 2026-10-21