Skip to content

fix(hooks): skip gate outside a Git repository - #5

Merged
ElbertePlinio merged 1 commit into
mainfrom
fix/hook-skip-outside-git
Aug 27, 2026
Merged

fix(hooks): skip gate outside a Git repository#5
ElbertePlinio merged 1 commit into
mainfrom
fix/hook-skip-outside-git

Conversation

@ElbertePlinio

Copy link
Copy Markdown
Member

What

hook claude|codex now passes (with a note: hook skipped line, Stop resets the loop counter) when cwd is not inside a Git repo with HEAD. Previously changed_files fell back to a whole-tree scan, so a Stop from e.g. ~/Projects blocked the session on thousands of untouched legacy functions across every project on disk. The CLI check --changed keeps its documented fallback.

Tested

cargo test (12 pass, new stop_hook_outside_git_repository_passes_without_scanning), clippy clean, self-gate clean, manual Stop from ~/Projects → exit 0, no block.

Not tested

Codex hook path shares repo_changes, not run live.

Risk

Trivial (local-review: main-agent). Spec updated.

@ElbertePlinio
ElbertePlinio merged commit bfdf42e into main Aug 27, 2026
8 checks passed
@ElbertePlinio
ElbertePlinio deleted the fix/hook-skip-outside-git branch August 27, 2026 04:11
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