Skip to content

16d-review-binding: gate the three rules that failed under attention - #9

Merged
HackTuah merged 1 commit into
mainfrom
slice/16d-review-binding
Sep 4, 2026
Merged

16d-review-binding: gate the three rules that failed under attention#9
HackTuah merged 1 commit into
mainfrom
slice/16d-review-binding

Conversation

@HackTuah

@HackTuah HackTuah commented Sep 4, 2026

Copy link
Copy Markdown
Member

Replaces #8, which was closed to clear a blocked rollup. The commit is unchanged27de8a1, tree 3797e134, trailer Reviewed-diff: e72d17e8…, signoff written by tools/signoff.sh over the tree both round-5 reviewers read.

What lands

Three rules produced during slice 16, each of which had already failed once while enforced by attention alone, become mechanical.

  1. .githooks/pre-commit refuses a commit on main. Positive match on the full ref, so a tag named main cannot defeat it (--short returns heads/main in that case). Detached HEAD is deliberately exempt — rebase, bisect and the reviewer's index checkout all run detached. A slip-guard, not an authorization control.

  2. .githooks/pre-commit greps tracked .md for every path the staged diff deletes or renames, failing on a hit not marked <!-- historical-path --> on the hit line or the one immediately above. Two lines above does not count.

    Earlier drafts failed open three separate ways, each caught by review and each fixed with a working negative control: C-quoted paths (non-ASCII, tab, quote, newline) that git grep -F could not match; blobs GNU grep calls binary, where it exits 0 and emits nothing on stdout; and an enumeration exiting 128, where the affirmative printed over an input never searched. Now NUL-delimited throughout, with both enumerations checking git's exit status.

    Scope, stated exactly: a tracked path, deleted or renamed by this commit, cited by exact string in a tracked .md. The three defects that motivated the rule are not in that domain — internal/ has never been tracked, one instance is a JSON key and one a stale line number — and the hook says so.

  3. tools/signoff.sh binds the signoff to the tree the reviewers read. Exactly two reviewer tree files per round, distinct reviewer numbers, both equal to git write-tree; .githooks/pre-commit re-checks at commit time. This exists because in slice 16c three of six staged files changed on disk mid-review: the attestation covers index bytes while the drift test hashes worktree bytes.

Also: one definition of the reviewable-diff recipe in tools/gate.sh (copies 3 → 2), with a test holding .githooks/commit-msg's remaining copy token-identical until slice 17 removes it; the two tools/gate.sh comment corrections carried from 16b; and BACKLOG.md §11 recording the advisory-print is_uint duplicate.

Review

Four rounds plus a fifth of scope "delta", two independent reviewers each, read-only on checkouts of the index.

Round Tree Gate integrity Record / regression Blocking
1 ebf90b65 FAIL PASS-with-residuals 2
2 11d2c441 FAIL FAIL 4
3 a3b8b2ce FAIL PASS-with-residuals 2
4 f159ea53 FAIL PASS-with-residuals 1
5 (scope: delta) 3797e134 CONFIRMED CONFIRMED 0

Seven blocking findings. Seven universal quantifiers. Zero mechanism defects after round 1. Every blocking finding was a claim in a tracked file — every, cannot, all three, would have — and not one was a defect in the code those words described. The slice closed by stripping the last such claim rather than qualifying it.

Why #8 was closed rather than merged

Its rollup carried two check-runs per context — a passing pull_request run and a failing force-push run — so two required contexts each showed a failure.

Cause, proved across three runs on this branch:

Run Head before Result
33700784040 d025d35 all-zeros (branch created) success
33709449011 27de8a1 d025d350… (orphaned by force-push) failure
33877201424 27de8a1 all-zeros (branch re-created) success

Same job, same code, same head SHA between the last two — only before differs. tools/gate.sh:173-176 guards the all-zeros sentinel but not a well-formed SHA that is unreachable; :178 then fails closed, correctly. The CI blind spot is filed against slice 18 with this derivation.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VNdY6wVS773UJgrHUeBN3Y

Three rules this session produced had no gate behind them, and each had already
failed once while enforced by attention alone. This commit makes them mechanical.

  1. .githooks/pre-commit refuses a commit on `main`. Positive match on the full
     ref, so a tag named `main` cannot defeat it; detached HEAD is deliberately
     exempt, because rebase, bisect and the reviewer's index checkout all run
     detached. A slip-guard, not an authorization control.

  2. .githooks/pre-commit greps tracked .md for every path the staged diff deletes
     or renames, failing on a hit not marked `<!-- historical-path -->` on the hit
     line or the one immediately above. NUL-delimited throughout, and both
     enumerations check git's exit status: earlier drafts failed OPEN on C-quoted
     paths, on blobs GNU grep calls binary, and when the enumeration exited 128 --
     printing an affirmative verdict over an input never searched.

  3. tools/signoff.sh binds the signoff to the tree the reviewers actually read:
     exactly two reviewer tree files per round, both equal to `git write-tree`, and
     .githooks/pre-commit re-checks that at commit time.

Also: one definition of the reviewable-diff recipe in tools/gate.sh (copies 3 -> 2),
with an equality test holding .githooks/commit-msg's remaining copy to it until
slice 17 removes it; the two tools/gate.sh comment corrections carried from 16b;
and BACKLOG.md section 11 recording the advisory-print `is_uint` duplicate.

Four review rounds, two independent reviewers each on index checkouts, plus one
owner-bounded record-lane read. Seven blocking findings, seven universal
quantifiers, zero mechanism defects after round 1 -- every blocking finding was a
claim in a tracked file, not a defect in the code it described. Evidence, probe
results and dispositions in internal/slices/16d-review-binding/FINDINGS.md.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VNdY6wVS773UJgrHUeBN3Y

Reviewed-diff: sha256:e72d17e808d5f3aac533e64fc0137b4cec601b78c2a5ab2fcf5e1c66950996e2
@HackTuah
HackTuah merged commit 07bfb44 into main Sep 4, 2026
38 of 44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant