From 7440e933d69b562ee012d8522bbdb133133953ca Mon Sep 17 00:00:00 2001 From: Jeroen Schweitzer Date: Sat, 23 May 2026 09:49:15 +0200 Subject: [PATCH] chore(config): disable pre-push clerk review pending rework (#965) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Clerk was net-negative on the #963 push: non-exhaustive (three distinct real D-202 inconsistencies surfaced only on successive re-pushes, each run missing the others — so APPROVED can't be trusted) and it re-reviews the whole range every push (token burn, no verdict cache). Gate it behind SR_RUN_CLERK=1 (default off). Rework tracked in #965; decision-record consistency is the author's responsibility until then. Co-Authored-By: Claude Opus 4.7 (1M context) --- .config/hooks/pre-push | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.config/hooks/pre-push b/.config/hooks/pre-push index 2241c909f..9a91001b3 100755 --- a/.config/hooks/pre-push +++ b/.config/hooks/pre-push @@ -191,10 +191,17 @@ else fi # --- Clerk review (D-221) --- -# Spawns the clerk agent to check D-record consistency against the diff. -# Optional: only runs if tooling/clerk-review exists and is executable. -# Set SR_SKIP_CLERK=1 to bypass (e.g. for trivial doc-only pushes). -if [ -x "$REPO_ROOT/tooling/clerk-review" ] && [ "${SR_SKIP_CLERK:-0}" != "1" ]; then +# DISABLED 2026-05-23 (#965) pending rework. Two problems made it net-negative: +# 1. Non-exhaustive — a single run reports ~the first contradiction it finds +# and stops, so distinct real issues surfaced only on the 2nd/3rd/4th +# re-push. An APPROVED verdict therefore can't be trusted as "clean". +# 2. Re-reviews the entire origin/main..HEAD range on every push (token burn); +# no per-commit verdict cache. +# Off by default until reworked (exhaustive enumeration + holistic decisions/ +# diff check + a SHA-keyed verdict cache invalidated on decisions/ change, with +# skip tracked in the cache rather than a commit-message trailer — see #965). +# Force-run with SR_RUN_CLERK=1. +if [ -x "$REPO_ROOT/tooling/clerk-review" ] && [ "${SR_RUN_CLERK:-0}" = "1" ]; then echo "pre-push: running clerk review..." CLERK_VERDICT=$("$REPO_ROOT/tooling/clerk-review" 2>&1 | tee /dev/stderr | tail -1) if [ "$CLERK_VERDICT" = "APPROVED" ]; then @@ -211,7 +218,7 @@ if [ -x "$REPO_ROOT/tooling/clerk-review" ] && [ "${SR_SKIP_CLERK:-0}" != "1" ]; ERRORS=$((ERRORS + 1)) fi else - echo "pre-push: clerk review — skipped (not installed or SR_SKIP_CLERK=1)" + echo "pre-push: clerk review — DISABLED (#965; force-run with SR_RUN_CLERK=1)" fi if [ "$ERRORS" -gt 0 ]; then