ci: stale .git/hooks/pre-commit shadow copy misleads diagnosis — dev/hooks + sem.hooks are authoritative #599

Closed
opened 2026-08-12 16:59:57 +00:00 by kert · 1 comment
Owner

A pre-sem.hooks bash copy of the pre-commit hook survived in .git/hooks/pre-commit (untracked, from before core.hooksPath=dev/hooks). It is inert — git runs dev/hooks/pre-commit → python -m sem.hooks, which already scopes pytest to changed modules and runs -n auto — but reading the stale copy as "the hook" cost a debugging session two 15-minute serial full-suite runs today while chasing #598. Removed the stale copy from this clone. README (§Pre-commit hooks) already documents the correct setup; no repo change needed beyond awareness. If other clones exist, rm .git/hooks/pre-commit there too.

A pre-sem.hooks bash copy of the pre-commit hook survived in `.git/hooks/pre-commit` (untracked, from before core.hooksPath=dev/hooks). It is inert — git runs `dev/hooks/pre-commit` → `python -m sem.hooks`, which already scopes pytest to changed modules and runs `-n auto` — but reading the stale copy as "the hook" cost a debugging session two 15-minute serial full-suite runs today while chasing #598. Removed the stale copy from this clone. README (§Pre-commit hooks) already documents the correct setup; no repo change needed beyond awareness. If other clones exist, `rm .git/hooks/pre-commit` there too.
kert added the ciquality labels 2026-08-12 16:59:57 +00:00
Author
Owner

Resolved in-clone: rm .git/hooks/pre-commit; verified git config core.hooksPath → dev/hooks and git rev-parse --git-path hooks → dev/hooks, so sem.hooks (scoped + -n auto, src/sem/hooks.py:312-320) is what actually gates commits. No tracked-file change required — closing.

Resolved in-clone: `rm .git/hooks/pre-commit`; verified `git config core.hooksPath` → `dev/hooks` and `git rev-parse --git-path hooks` → `dev/hooks`, so `sem.hooks` (scoped + `-n auto`, src/sem/hooks.py:312-320) is what actually gates commits. No tracked-file change required — closing.
kert closed this issue 2026-08-12 16:59:58 +00:00
Sign in to join this conversation.