fix(re): the capture-citation check was red on a clean tree #65
Reference in New Issue
Block a user
Delete Branch "fix/captures-root-citation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found by running the check on
mainafter #64 merged: it exits 1 on a correct checkout.committed()built its directory set fromrange(4, len(parts)). Index 3 isdocs/re/capturesitself, so every sub-directory was registered and the root never was. Eight pages cite the directory as a whole — PROTOCOL's evidence table,CONSOLIDATION.md,CONTAINERS-AND-AGENTS.md,decoder-loop.md, both HANDOFFs,BLOCKED.md,verify-screen-blend-divergence.md— and each of those read as a citation of a file that does not exist.That is the failure mode the script's own comments warn about: "a gate that is red on every clean checkout" teaches people to ignore it, and this one has a second half (no game asset tracked, issue #49) that has to stay believed.
The selftest could not see it
It takes
next(iter(dirs))— and an arbitrary member of that set is always a sub-directory, the one case that already worked. It now asserts the root explicitly, with and without its trailing slash.Both new cases were confirmed to FAIL against the unfixed function before the fix went in. A selftest case that passes either way is decoration, which is a lesson this file already learned once (see its
SELFregression guard).Measured
docs/re/captures/)What to look at
Pass:
python3 tools/re/check-capture-citationsexits 0 and--selftestprints tenok.Fail: either still reports
cited but NOT present, or the two new root cases pass whenrange(3, …)is reverted torange(4, …).🤖 Generated with Claude Code