Repository navigation
Decide, rather than crash, for a path outside the repository - #59
Merged
Merged
Conversation
Round 1 (inner phase).
Round 2 (inner phase).
codev gate check resolved the tool payload's file path against the repository root, and Path.relative_to raises when the path lies outside it, so every hook recorded degraded and allowed the call unchecked. Any scratchpad, agent-memory, or /tmp path triggered it -- 56 of 80 gate calls in a day once the unresolvable-codev cause was fixed. A degraded verdict now also says which kind it was: internal_error for a raise inside the gate, infrastructure for absent tooling. Filing both under one label is what let the original unchecked calls go unnoticed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Round 2 (inner phase).
3 tasks
urban233
marked this pull request as ready for review
September 11, 2026 21:11
This was referenced Sep 11, 2026
gate.py: infrastructure vs internal_error can be inverted or a false outside-repo allow recorded
#66
Open
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.
Closes #58
Summary
codev gate checkresolves the tool payload's file path against the repository root, andPath.relative_toraises when the path lies outside it -- so the hook recordsdegradedand allows the call unchecked. Any scratchpad, memory-directory, or /tmp path triggers it.Deliberately left out of scope by #57 at 8 occurrences against 508. With that slice's PATH cause fixed, this is now 56 of 80 gate calls in a day. A path outside the repository is not something these gates govern -- it should resolve to a recorded allow, not a crash. Internal errors should also carry a
failure_class, which today only invocation failures do.Test plan
Scope
Changed files: .claude/hooks/require_plan.py, .claude/hooks/require_small_change.py, .claude/hooks/require_wave_shape.py, .codev/task/gate-decides-for-out-of-repo-paths/git-state.json, .codev/task/gate-decides-for-out-of-repo-paths/round-state.json, CHANGELOG.md, src/codev_workflow/bundle/.claude/hooks/require_plan.py, src/codev_workflow/bundle/.claude/hooks/require_small_change.py, src/codev_workflow/bundle/.claude/hooks/require_wave_shape.py, src/codev_workflow/gate.py, tests/test_gate.py
Review
Latest task review: READY_FOR_HUMAN_APPROVAL.
Task: gate-decides-for-out-of-repo-paths (#58)
Full review history:
codev task log --id gate-decides-for-out-of-repo-pathsI directed this change and I own it -- that makes me its author, not its reviewer. ADR-0037 still requires a separate approving review from someone who is neither this task's owner nor a bot.