From 6235b5d9276dd4c780769d4994c00205c9ef4787 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 15 Sep 2026 03:20:30 +0100 Subject: [PATCH 1/2] fix(hooks): remove two dead-format gates that deadlocked every commit standards could not accept ANY commit through its own pre-commit hook. Two gates blocked each other, and both validate a format that no longer exists. The registry drift guard demanded every commit stage .machine_readable/REGISTRY.a2ml -- a generated, TOML-shaped artefact, i.e. a specimen of the record dialect the owner ruled SUPERSEDED on 2026-09-08. Staging it then tripped the "A2ML manifests" gate, because validate-a2ml.sh greps manifest syntax (^version:, ^(agent-id|pedigree):) that the live s-expression .deed grammar does not have. Measured: validate-a2ml.sh passes 0 of 222 tracked .a2ml files in this repo. Every commit in this repo's history must therefore have bypassed the hook. Repairing the regex is not the cure. It would turn all 222 files red at once, and it would be repairing a validator for a format the owner has ruled dead: A2ML was abandoned after the ML community objected to the name. .deed and .k9 are the live formats. Note the dates. REGISTRY.a2ml and scripts/build-registry.sh were created 2026-06-03 (#356, #357) -- legitimate work, three months before the DEED rename, simply never migrated. But .githooks/validate-a2ml.sh was created 2026-09-12, NINE DAYS AFTER the rename ruling and four days after the record dialect was killed: a new gate written for a format already declared dead. No hook in this repo knows .deed exists (pre-commit a2ml=4 / deed=0). Removed, per owner ruling R-H3 (2026-09-15): - run_validator "A2ML manifests" "validate-a2ml.sh" "staged" - the registry drift guard block Kept deliberately: - the K9 contracts gate. K9 is live. - registry drift coverage, which CI still enforces at .github/workflows/registry-verify.yml:56 (build-registry.sh --check). - REGISTRY.a2ml itself, byte-for-byte (owner ruling R-H4). It is a GENERATED artefact, so reshaping scripts/build-registry.sh is a separate, deliberate job and is not coupled to unblocking commits. A .deed validator returns to this hook once the dual-accept validate-action lands (owner ruling R-H2). Verification: bash -n clean; the hook now exits 0 against a staged set it previously rejected. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_0168Bgpez8mFBcAqYAj8VgEx --- .githooks/pre-commit | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.githooks/pre-commit b/.githooks/pre-commit index 475355db7..20f4a543b 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -65,8 +65,14 @@ default_validator '(^|/)Makefile(\.|$)|\.mk$' "Makefiles not allowed. Use Mustfi default_validator '\.(java|kt|kts)$' "Java/Kotlin files not allowed. Use Rust/Tauri/Dioxus instead." default_validator '\.swift$' "Swift files not allowed. Use Tauri/Dioxus instead." -# A2ML + K9 + SPDX validation -run_validator "A2ML manifests" "validate-a2ml.sh" "staged" +# DEED + K9 + SPDX validation +# NOTE: the "A2ML manifests" gate was REMOVED 2026-09-15 (owner ruling R-H3). +# A2ML no longer exists as a format. validate-a2ml.sh was written 2026-09-12 -- +# nine days AFTER the DEED rename ruling -- and greps manifest syntax +# (^version:, ^(agent-id|pedigree):) that the live s-expression .deed grammar +# does not have. It passed 0 of 222 tracked .a2ml files, so NO commit could be +# made through this hook. Repairing the regex would turn all 222 red at once. +# A .deed validator returns here once the dual-accept action lands (R-H2). run_validator "K9 contracts" "validate-k9.sh" "staged" run_validator "SPDX headers" "validate-spdx.sh" "staged" @@ -77,15 +83,13 @@ run_validator "Workflow permissions" "validate-permissions.sh" "staged" run_validator "CodeQL configuration" "validate-codeql.sh" "staged" run_validator "Bot directives" "validate-bot-directives.sh" "staged" -# Registry drift guard -if [ -f "$REPO_ROOT/scripts/build-registry.sh" ]; then - echo -e "${BLUE}[pre-commit]${NC} Checking registry drift..." - if ! bash "$REPO_ROOT/scripts/build-registry.sh" --check >/dev/null 2>&1; then - echo -e "${RED}[pre-commit] REGISTRY.a2ml / TOPOLOGY.adoc are stale${NC}" >&2 - echo " Fix: bash scripts/build-registry.sh && git add .machine_readable/REGISTRY.a2ml TOPOLOGY.adoc" >&2 - ERRORS=$((ERRORS + 1)) - fi -fi +# Registry drift guard -- REMOVED 2026-09-15 (owner ruling R-H3). +# It demanded that every commit stage .machine_readable/REGISTRY.a2ml, a generated +# TOML-shaped artefact -- i.e. a specimen of the record dialect the owner ruled +# SUPERSEDED on 2026-09-08. Staging it then tripped the A2ML gate above, so the +# two gates deadlocked each other. The registry itself is UNCHANGED (R-H4); +# reshaping scripts/build-registry.sh is a separate, deliberate job. +# Drift is still caught in CI by .github/workflows/registry-verify.yml. # Canonical names guard if [ -f "$REPO_ROOT/scripts/check-canonical-names.sh" ]; then From 3a7971c498e2267d4dab43657ede2fc8bac16f4a Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Tue, 15 Sep 2026 03:23:42 +0100 Subject: [PATCH 2/2] fix(hooks): remove the same dead A2ML gate from pre-push The deadlock had a second limb. Removing the A2ML gate from pre-commit was not enough: pre-push line 44 runs the identical dead validator, so a push whose tip commit touched a .a2ml file was still rejected. Found the hard way -- a push whose only change was regenerating .machine_readable/REGISTRY.a2ml with the repo's own generator was refused with "missing agent-id or pedigree" and "missing version", manifest-dialect keys the live s-expression .deed grammar does not have. Same ruling (R-H3), same reasoning as the pre-commit removal in the previous commit. The K9 gate stays: K9 is live. Separately noted, NOT changed here: pre-push computes its file set from HEAD~1..HEAD, so a multi-commit push validates only the TIP commit. That is a latent fake-gate and deserves its own fix. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_0168Bgpez8mFBcAqYAj8VgEx --- .githooks/pre-push | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.githooks/pre-push b/.githooks/pre-push index 81f7a3bb5..5164991fe 100755 --- a/.githooks/pre-push +++ b/.githooks/pre-push @@ -41,7 +41,13 @@ run() { } # Core validations -run "A2ML manifests" "validate-a2ml.sh" +# NOTE: the "A2ML manifests" gate was REMOVED 2026-09-15 (owner ruling R-H3), +# for the same reason as in pre-commit: A2ML no longer exists as a format, and +# validate-a2ml.sh greps manifest syntax the live s-expression .deed grammar +# does not have. It passed 0 of 222 tracked .a2ml files, so this gate blocked +# every push whose tip commit touched one -- including a push whose ONLY change +# was regenerating .machine_readable/REGISTRY.a2ml with the repo generator. +# A .deed validator returns here once the dual-accept action lands (R-H2). run "K9 contracts" "validate-k9.sh" run "SPDX headers" "validate-spdx.sh" run "Workflow SPDX" "validate-spdx-workflows.sh"