You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Push in under 30 s: fast pre-push, full gauntlet once at merge, pass cache by tree hash #735
Operator goal (2026-10-27): every git push finishes in at most 30 s. Operator approved this design.
Why
pre-push runs the whole gauntlet behind a machine-wide one-at-a-time queue. One PR ran it 3-5 times today (first push, each review-fix push, merge-pr.sh's sync push, a conflict fix), each several minutes plus queue time (one push waited 39 min behind a replay).
A full-gauntlet push can never fit 30 s: tests/hooks/test-gates-irrecoverable-2.sh alone took 209 s and test-gates-other.sh 72 s (load 12-14).
git-hooks/pre-push keeps its cheap steps (ref parsing, the develop-push refusal, the develop-overlap check) and replaces the full gauntlet with a fast layer: lint of the files the push changes (bash -n, shellcheck, py/json lint, the home-path ban), no gauntlet queue, no test layer. Target well under 30 s. An env var (e.g. MH_PREPUSH_FULL=1) still runs the full gauntlet on demand.
scripts/merge-pr.sh runs the full gauntlet itself, on the exact tree it is about to push and merge, under the gauntlet lock, BEFORE pushing (today it relies on the pre-push hook for that). run_gauntlet_here likewise calls scripts/run-gauntlet.sh directly.
scripts/sync-pr-head.sh (the cloud path, whose pre-push is today the only gauntlet gate) runs the full gauntlet before its push.
Pass cache keyed by tree hash: scripts/run-gauntlet.sh records a pass under ~/.cache/mh/gauntlet-pass/<HEAD^{tree}> only after a full run where every layer passed and the working tree was clean (identical to HEAD). merge-pr.sh / sync-pr-head.sh skip the run on a hit. Never recorded on a partial, sharded, or dirty run.
Docs: CLAUDE.md validation block, docs/reference/repo-gotchas.md, docs/reference/branching-model.md, docs/reference/env-vars.md, the pre-push and run-gauntlet.sh headers.
Done when
A push of a normal branch finishes in < 30 s on this machine (measured), and does not take the gauntlet lock.
merge-pr.sh refuses to merge when the full gauntlet fails on the merged tree (test), and skips the run on a cached pass for the same tree (test).
A dirty or partial run never writes a cache entry (test).
Activity
chore(gauntlet): PR #740 review clean-ups (GH #735)
Merge pull request #740 from wasikarn/claude/gh735-fast-push