fix: remove the broken pre-push hook and its install instructions (C-340) - #441
Merged
Merged
Conversation
…340) `development` has been carrying a pre-push hook that does not work, and `publishing_to_pypi.md` told you to install it — twice. Anyone running `git config core.hooksPath scripts/git-hooks` got a hook that checks the WRONG BRANCH (it read `git rev-parse HEAD` instead of the refs git supplies on stdin) and permanently refuses branch names reused from old pull requests. That is a trap, and it shipped in #437. Four hook versions and three detector versions were written to close C-340 mechanism 2; each was defeated by a different property of git, gh or GitHub. The harm being guarded against is two orphaned commits in ~440 pull requests, both recovered by cherry-pick. The guards cost far more than the failures, so there is no guard — and the guide now says so plainly instead of pointing at one. removed scripts/git-hooks/pre-push removed tests/test_git_hooks.py (vacuous: reconstructing the broken v1 hook passed all seven of its behavioural tests) guide install instructions replaced by what to do if it happens Mechanism 1 is unaffected: scripts/arm_automerge.sh stays, works, and was drilled live. Closes the last of epic #421, which is closed as a whole. validate_docs PASSED | ruff clean | PYTEST_EXIT=0 | FAILED=0 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
developmentcarries a pre-push hook that does not work, andpublishing_to_pypi.mdtells you to install it twice. Anyone who runsgit config core.hooksPath scripts/git-hooksgets a hook that checks the wrong branch — it readsgit rev-parse HEADinstead of the refs git supplies on stdin — and permanently refuses branch names reused from old pull requests (docs/roadmap-plan-v11spans #50–54). It shipped in #437.This is the residue of #439, which was closed unmerged. Nothing else from that PR survives.
What changes
scripts/git-hooks/pre-pushtests/test_git_hooks.py— vacuous; reconstructing the broken v1 hook passed all seven of its behavioural testsscripts/arm_automerge.shis untouched — C-340 mechanism 1 is solved and drilled.Why no replacement
Four hook versions and three detector versions, each defeated by a different property of git,
ghor GitHub. The harm is two orphaned commits in ~440 pull requests, both recovered by cherry-pick. Accepted as a known nuisance; recovery is documented.Last piece of epic #421, which is closed.
validate_docsPASSED ·ruffclean ·PYTEST_EXIT=0·FAILED=0🤖 Generated with Claude Code