Files
computer-playbook/.pre-commit-config.yaml
kevinveenbirkenbachandClaude Opus 5 fd00a522ac fix(hooks): move the merge-signature gate off prepare-commit-msg
git commit --no-verify skips pre-commit and commit-msg, but not prepare-commit-msg. The gate sat on that stage, so the pre-commit framework ran on every commit regardless and did its stash-unstaged dance. Inside the agent sandbox its rollback (git checkout -- .) cannot unlink the bind-mounted .claude/settings.json, aborts mid-restore, and leaves every unstaged change reverted to HEAD -- twelve files of work, no commit created.

The gate itself is harmless: merge_signed.sh returns 0 immediately without a MERGE_HEAD. Only the stage was wrong. On commit-msg it still runs for a normal merge commit, and --no-verify now behaves as documented. Tradeoff: a merge committed with --no-verify skips the signature check, same as it already skips make test.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 23:53:43 +02:00

58 lines
1.4 KiB
YAML

---
default_install_hook_types:
- pre-commit
- commit-msg
- pre-push
- post-checkout
repos:
- repo: local
hooks:
- id: make-test
name: Run make test
entry: make test
language: system
pass_filenames: false
stages:
- pre-commit
- id: make-test-merge-signed
name: Run make test-merge-signed (merge gate)
entry: make test-merge-signed
language: system
pass_filenames: false
always_run: true
stages:
- commit-msg
- id: make-lint
name: Run make lint (pre-push gate)
entry: make lint
language: system
pass_filenames: false
always_run: true
stages:
- pre-push
- id: make-test-main-merged
name: Run make test-main-merged (pre-push gate)
entry: make test-main-merged
language: system
pass_filenames: false
always_run: true
stages:
- pre-push
- id: make-test-signed
name: Run make test-signed (pre-push gate)
entry: make test-signed
language: system
pass_filenames: false
always_run: true
stages:
- pre-push
- id: clean-pycache-dirs
name: Prune orphan __pycache__-only dirs (post-checkout)
entry: make clean-pycache-dirs
language: system
pass_filenames: false
always_run: true
stages:
- post-checkout