Repository navigation
Description
charly#309 added scripts/verify-claimed-changes.sh and then removed it before landing. This issue records why, and everything measured, so a second attempt starts from the evidence rather than from scratch.
What it was for, and it is a real gap
Across one cutover, eight defects shared one shape: a proxy standing in for the artifact — a working tree read instead of git show <sha>:<path>, an exit code instead of the resulting PR body, a diffstat instead of file content, a submodule checkout instead of a pin. Eighteen green bed runs caught none of them; every one was caught by a reviewer reading a committed object.
The sharpest instance: a commit on a docs branch reverted its own branch's work to main, byte-identical, while its message described the fix. A diff review sees a plausible edit; only a blob comparison sees it. The script's job was to catch that mechanically.
Why it does not work yet — three defects, two of them found by reviewers
1. Parser bug (false NEGATIVE, and it hid the others). Positional binding tested [ "$base" = "origin/main" ] as a proxy for "has base been bound yet". A caller passing the literal string origin/main defeats it: the test still reads true, so the SECOND positional overwrites base and head silently stays HEAD. My verification run was exactly that shape — it compared a branch against a detached checkout and printed CLEAN. A guard written to catch verified-against-the-wrong-object verified against the wrong object, through its own argument handling.
2. Merge commits (false POSITIVE). The walk used git log base..head, which includes merges, and git diff $c^ $c on a merge is the FIRST-PARENT diff — everything the other parent brought in. Those paths sit at their base blobs on both sides, so they are absent from the net diff and every one is reported. Four files on one PR. Fixed with --no-merges.
3. Merge RESOLUTIONS (false POSITIVE, and this is the one that sinks the design). A catch-up merge that resolves a conflict in favour of the base leaves head == base for that path — byte-indistinguishable from an edit-then-revert. One ordinary git merge origin/main on charly#309 reported 93 go.mod files as changed-then-undone. Every one was a correct, deliberate resolution taking main's newer spec pin.
Why it was withdrawn rather than patched
The script's own header states the rule it then violated: "a check with false positives gets disabled by whoever inherits it." A check that reds 93 times on a routine catch-up merge is worse than no check — it trains people to ignore it, and every future catch-up merge in this repo would trip it.
Defect 3 is not a bug, it is the definition being wrong. "A path some commit edited that the net diff no longer contains" genuinely describes both an accidental revert and a deliberate resolution, and no amount of flag-adding separates them from the diff alone.
What a working version probably needs
- Exclude paths whose final state was set by a merge resolution — computable as the first-parent diff of each merge commit on the branch. Untested; it is the obvious next step and it may well have its own false-positive class, since it would also hide a bad resolution.
- A recorded-hold mechanism for the legitimate prepare-then-hold-back pattern, exact-match and self-liquidating in the style of
scripts/drift-baseline-*.txt.charly#309genuinely carries one:.github/workflows/ci.ymlis added and then withdrawn because pushing under.github/workflows/needs theworkflowOAuth scope this token lacks. - Arity checking. The original silently swallowed a third positional.
What survives, and is landing
scripts/verify-changelog-h1.sh — narrow by construction, fires only when a CHANGELOG H1 names a CalVer different from its filename, and mutation-tested against ground truth by an independent validator using a live true positive on plugins/main: red on the real defect, green on its fix. Its first draft flagged anything not matching # <CalVer> — <title> and returned 35 hits where one was real; the narrowing is the load-bearing part, and is the same lesson defect 3 above teaches.
The finding that no script closes
One instance from that cutover has no mechanical form: a sweep keyed on a VALUE finds every SITE, but the obligation attaches to the MEANING at each site — a pin must track, a citation of a measurement must be preserved. Same string, opposite duties, and no gate can tell them apart because the gate only knows the string.
Assisted-by: Claude Code Anthropic Claude Opus 5 (analysed on a live system)
Activity
atrawog commentedon Aug 28, 2026
Validation (2026-08-28) — RESOLVED (superseded)
Verified against current repos. The script was withdrawn before landing and was never re-landed; the issue itself records the decision. The gap it was meant to close (a proxy standing in for the artifact) is now covered by the fresh pr-validator model, which validates the actual PR diff (the org-wide
charly/pr-validatorworkflow +pi-review-action), and theverify-changelog-h1.shscript that did land carries forward the withdrawn script's reasoning (its comment cites "the same reasoning that put --no-merges in verify-claimed-changes.sh").Closing as superseded.