Skip to content

fix: remove the broken pre-push hook and its install instructions (C-340) - #441

Merged
Polichinel merged 1 commit into
developmentfrom
fix/remove-broken-pre-push-hook
Aug 12, 2026
Merged

fix: remove the broken pre-push hook and its install instructions (C-340)#441
Polichinel merged 1 commit into
developmentfrom
fix/remove-broken-pre-push-hook

Conversation

@Polichinel

Copy link
Copy Markdown
Contributor

development carries a pre-push hook that does not work, and publishing_to_pypi.md tells you to install it twice. Anyone who runs git config core.hooksPath scripts/git-hooks gets a hook that checks the wrong branch — it reads git rev-parse HEAD instead of the refs git supplies on stdin — and permanently refuses branch names reused from old pull requests (docs/roadmap-plan-v11 spans #50–54). It shipped in #437.

This is the residue of #439, which was closed unmerged. Nothing else from that PR survives.

What changes

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 three sentences: there is no guard, why, and the cherry-pick if it happens

scripts/arm_automerge.sh is 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, gh or 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_docs PASSED · ruff clean · PYTEST_EXIT=0 · FAILED=0

🤖 Generated with Claude Code

…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>
@Polichinel
Polichinel merged commit 12d5afa into development Aug 12, 2026
5 checks passed
@Polichinel
Polichinel deleted the fix/remove-broken-pre-push-hook branch August 12, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant