From 33d4547ddac7e26a534e516d42b97f1c6430da89 Mon Sep 17 00:00:00 2001 From: bdeshi Date: Fri, 31 Jul 2026 02:25:01 +0600 Subject: [PATCH] gate that the staged tree builds, not just the working tree MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Earned by a real mistake this session: `web.Handler` gained a parameter, its caller in cmd/ was updated in the working tree, and `git add internal docs` left that caller out. verify.sh was green throughout, because every gate looks at the files on disk rather than at the commit being made. The result was a commit that did not compile — the kind of thing git bisect trips over for as long as the repo exists. I rewrote the two local commits rather than adding a fix-up on top. The check builds a throwaway checkout of the index via `git write-tree`, so it cannot touch the real index or working tree, and it only runs when something is staged. Proved both directions: staging a signature change without its caller fails, a clean tree passes. Eighth gate defect found by running the harness against real work rather than reasoning about it — and the first that was a missing gate rather than a wrong one. --- HARNESS.md | 6 ++++++ scripts/verify.sh | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/HARNESS.md b/HARNESS.md index ab32611..1eb63f5 100644 --- a/HARNESS.md +++ b/HARNESS.md @@ -52,6 +52,12 @@ must do — not the theme. `verify.sh` fails if the embedded reference theme cha changing, because in practice those two drift together — and it fails on a `