verify-before-stop: TEST_CMD_RE recognizes the pack's own entrypoints - #76
Merged
Conversation
Observed live twice (2026-07-24): the hook blocked its own repo's sessions while genuine verification ran — bash hooks/test-*.sh and python3 .github/checks.py were invisible to TEST_CMD_RE, whose only script-shaped alternate was the literal bash checks/run-all.sh (the gtg target-project convention — kept; gate-before-commit.sh consumes it and both READMEs teach it). Three alternates added inside the existing command-position group: bash \S*run-all.sh (generalizes the literal, covers template/run-all.sh), bash \S*test-*.sh, python3? \S*checks.py. BLOCK_REASON gains a breadth clause; Known limits documents the option-prefixed forms (bash -e) that stay unmatched. False-allow tolerance is deliberate and now commented: this is a presence heuristic and false-block is the expensive direction here. Tests: +4 fixtures (three two-sided allows + cat-of-a-test-script negative), suite 23/23; pre-fix hook fails exactly at the first new allow. Gate (grok-4.5 high + gpt-5.6-luna ultra + gpt-5.6-sol max, single pre-commit round): TRIPLE PROCEED — grok reproduced the two-sided run and stress-probed negatives; nits folded (overmatch comment, option-form Known-limits line) or kept-with-reason (fixture ordering, .bak-suffix tolerance). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GhLu6NCGzM9HxnqNb87MAx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Owner-requested follow-up to PR #74: the hook blocked its own repo's sessions twice today while genuine verification ran —
bash hooks/test-*.shandpython3 .github/checks.pywere invisible toTEST_CMD_RE. Three command-position alternates added (generalizedrun-all.sh,test-*.shsuites,checks.py), BLOCK_REASON breadth clause, option-prefix forms documented as a known limit. The gtgchecks/run-all.shconvention is untouched (gate-before-commit.sh consumes it; both READMEs teach it).Two-sided: suite 23/23 on the fix; pre-fix hook fails exactly at the first new allow fixture.
catof a test script still blocks (negative guard).Gate: single pre-commit round, three families — TRIPLE PROCEED (grok reproduced the suite + stress-probed command-position negatives; luna/sol nits folded or kept-with-reason; false-allow direction explicitly adjudicated as the cheap one for a presence heuristic).
🤖 Generated with Claude Code
https://claude.ai/code/session_01GhLu6NCGzM9HxnqNb87MAx