Repository navigation
fix(issue-review): allow read-only Git searches - #271
Conversation
The hook allowed git grep, ls-files, blame and merge-base for issue_review, but allowed_tool_patterns, Claude's first barrier, still limited them to the review and writing roles. Both now read GIT_SEARCH_ROLES, and a test runs the command the #268 issue review was refused through both barriers. Refs #270
[CCR-20261019-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2Initial review — PR #271 (work item #270)Verdict: CHANGES_REQUESTED — reviewed head Summary and scopeReviewed the full accumulated diff The change adds The code is correct and minimal, and the tests exercise both barriers plus a real Findings[REV-001] · low · open · - · blocks:yes — Stage permission table still lists no Git search for
|
| Command | Result |
|---|---|
python3 -m unittest tests.test_stage_permissions |
OK — 67 tests, including the new test_every_searching_stage_gets_the_git_search_prefixes and test_issue_review_runs_the_git_search_it_was_denied |
python3 scripts/validate-package.py |
OK — VALID: 16 skills (7 cycle, 9 supporting), shared sections in sync, cross-agent manifests aligned |
python3 -m unittest |
OK — 0 tests discovered (as the PR states) |
python3 -m unittest discover -s tests |
exit 1 — Ran 1599 tests, FAILED (failures=1, errors=62); environment-caused, see below |
Unverified items
The full-suite failures are caused by the review sandbox, not by this change. None of them touch the changed files:
- All 62 errors are in
test_validate_packageand come fromshutil.copytreeof the clone failing with[Errno 13] Permission deniedon sandbox-masked host paths (.bashrc,.gitconfig,.claude/settings.json, …). - The 1 failure is
test_executors.ReadOnlyVerificationTests.test_scratch_never_uses_a_temp_parent_inside_the_checkout(no temporary directory outside the dispatch checkout). The sandbox only allows writes under the dispatchTMPDIR.
Those tests were not verified locally. They passed in CI on this same head (Linux and four Windows shards).
CI (policy: parallel)
All checks of head 508b772 have completed and passed (6/6, "Validate package" workflow):
- Skills, manifests, and Bash installer — pass
- Windows test shard (windows-1) — pass
- Windows test shard (windows-2) — pass
- Windows test shard (windows-3) — pass
- Windows test shard (windows-4) — pass
- PowerShell installer — pass
Residual risk
Low. The behavioural change is confined to two set-membership checks, and both are covered by tests. Once REV-001 is fixed, the documented contract matches the code.
Project review verdict: CHANGES_REQUESTED (blocking: REV-001).
[CCR-20261019-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261019-001] · cheap_coder · openai/gpt-6-luna→? · high · triaged:508b7725229632a2cdf4de5c2e9377f68802a652 · schema:2Resolve summary — PR #271 (work item #270)Applied fix[REV-001] · low · resolved · valid · blocks:yes — Stage permission table still lists no Git search for
|
[CCR-20261019-001] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2[CCT-20261019-001] · cheap_coder · openai/gpt-6-luna→? · high · triaged:508b7725229632a2cdf4de5c2e9377f68802a652 · schema:2[CCR-20261019-002] · senior_reviewer · anthropic/claude-opus-5-5→? · high · schema:2Rereview — PR #271 (work item #270)Verdict: REVIEW_PASSED_AWAITING_CI. The review is complete for head What changed since the previous reviewThe previous review was on Accumulated reviewThe full accumulated diff
Previous findings[REV-001] · low · resolved · valid · blocks:yes — Stage permission table still lists no Git search for
|
| Command | Result |
|---|---|
python3 -m unittest tests.test_stage_permissions |
OK, 67 tests |
python3 scripts/validate-package.py |
OK: VALID: 16 skills (7 cycle, 9 supporting), shared sections in sync, cross-agent manifests aligned |
python3 -m unittest |
OK, 0 tests discovered |
python3 -m unittest discover -s tests |
exit 1: Ran 1599 tests, FAILED (failures=1, errors=62). The sandbox causes these failures; see below |
Unverified items
The full suite's failures are the same 63 as in the previous review, and none touches the changed files:
- 62 errors in
test_validate_package.shutil.copytreeof the clone fails with[Errno 13] Permission deniedon sandbox-masked paths such as.bashrc,.gitconfigand.claude/settings.json. - 1 failure in
test_executors:test_scratch_never_uses_a_temp_parent_inside_the_checkoutreportsno temporary directory outside the dispatch checkout, because the sandbox allows writes only under the dispatchTMPDIR.
Those 63 tests were not verified locally. CI on this head runs them.
CI (policy: parallel; read once, not waited on)
These are the checks of head 880a736 in the "Validate package" workflow, run 39231937774:
- Skills, manifests, and Bash installer — in progress
- Windows test shard (windows-1) — in progress
- Windows test shard (windows-2) — in progress
- Windows test shard (windows-3) — in progress
- Windows test shard (windows-4) — in progress
- PowerShell installer — not yet reported in this head's rollup (it passed on
508b772)
Passed 0, failed 0, pending 5. The CI gate waits for these checks and decides.
Residual risk
Low. The behavioural change is two set-membership checks covered by unit and end-to-end tests, and the documented contract now matches the code.
Project review verdict: REVIEW_PASSED_AWAITING_CI (no blocking findings).
Summary
Grant the
issue_reviewstage the existing read-onlyGIT_REVIEW_READGit subcommands (merge-base,ls-files,grep, andblame). This restores repository search needed to assess work items without granting fetch or write subcommands. Existing executing-option guards still refusegit grep -O…and--open-files-in-pager.Diagnosis
The issue reported that
issue_reviewcould not search the repository. I confirmed the cause in_check_git:GIT_REVIEW_READwas added only for review and writing roles, andissue_reviewwas not in either set. The existing test reproduced the defect by expectinggit grepandgit blameto be denied for that role. The invariant is thatissue_reviewcan inspect repository content while retaining its read-only command boundary.A widened search for
issue_review git grepfound only this issue; searching closed issues forstage_permissions.pyfound no related items. The fix addsISSUE_REVIEW_ROLEonly to the read-set condition. It does not add the role toREVIEW_ROLES, which would grant fetch.Work units
scripts/stage_permissions.py,tests/test_stage_permissions.pytests/test_stage_permissions.pypython3 -m unittest discover -s testspassed (1,597 tests);python3 scripts/validate-package.pypassed;python3 -m unittestpassed (0 tests discovered)Verification environment
Local verification ran in this linked worktree with its configured Python runtime and repository files. CI will run on its configured Linux and Windows environments; local checks do not validate those platform runs.
Stage routing: profile
cheap_coder; requested modelopenai/gpt-6-luna; efforthigh; resolved model?.Follow-up (508b772)
The round 0 review found that
allowed_tool_patterns(), Claude's--allowedToolsbarrier, still excludedissue_reviewfrom the git search prefixes. Both barriers now readGIT_SEARCH_ROLES; new tests cover the patterns and run the exact command #268's issue review was refused through the hook and against a real repository.Closes #270