chore: session-infra hardening — command-guard hook (pkill -f/force-push denied) + orphan-spec server-leak fix - #522
Merged
Conversation
…t failure no longer leaks the port into the retry Regression class: a dedicated-port server stopped only after its assertions leaks on test timeout, and the retry's bind failure then masks the real error. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012im1JxQQV2ahnXzZDdVmZq
alicoding
enabled auto-merge (squash)
August 29, 2026 20:10
…tory-rewrite are hook-denied (goal 0191) The two never-granted command families with real incidents behind them (a broad pkill killed the production mill-server; force-push is CLAUDE.md's standing never) move from prose to a deterministic deny: scripts/hook-command-guard.sh, same fail-open/exit-2 contract as hook-build-guard.sh. Patterns anchor to command-segment starts so a commit message MENTIONING these words never false-positives; a 16-case matrix (8 deny / 8 pass) was run against the script and caught two regex false negatives before wiring. amend/plain-rebase stay judgement (the rule's own 'without being explicitly asked' makes a hard deny wrong, and the pr-shepherd's instructed rebases are a legal flow). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012im1JxQQV2ahnXzZDdVmZq
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.
Two session-infrastructure changes (goal 0191's evidence bar — hooks only for problems that actually occurred):
scripts/hook-command-guard.sh): the two never-granted command families move from prose to deterministic denies —pkill -f/killall(a broad pkill once killed the production mill-server LaunchAgent) andgit push --force[-with-lease]/-f+filter-branch/filter-repo(CLAUDE.md's standing never). Same fail-open/exit-2 contract ashook-build-guard.sh; patterns anchor to command-segment starts so commit messages mentioning the words never false-positive. A 16-case deny/pass matrix ran against the script and caught two regex false negatives before wiring.commit --amend/plaingit rebasedeliberately stay judgement (the rule's own 'without being explicitly asked', and the pr-shepherd's instructed rebases are a legal flow). Shopping trip done per the goal's adopt-first rule: community collections exist but ship generic rm-rf blockers, not this repo's policy — the deny mechanism itself is the officially documented PreToolUse contract the repo already carries.🤖 Generated with Claude Code
https://claude.ai/code/session_012im1JxQQV2ahnXzZDdVmZq