Repository navigation
fix(claude-review): tell the reviewer it cannot run checks - #196
Conversation
On mctl-academy#322 the reviewer read the repository CLAUDE.md, tried npm ci and npm run lint:content, was refused by the narrowed tool allowlist, and stopped without submitting a verdict. The prompt never said the review is static, so a refused command read as a reason to withhold judgement. Running PR-head scripts in a job that holds the OAuth token would be unsafe, and CI already runs those checks. Claude-Session: https://claude.ai/code/session_01KMPGAe5mmsUMmPD9AZP8Zk
|
Claude finished @mashkovd's task in 25s —— View job Review: approved (0 P1, 0 P2, 1 P3)
The new paragraph in P3, |
| and may point at a newer commit while this invocation is running. | ||
| Files in the checkout and both git object IDs are pinned. | ||
|
|
||
| This is a static review. Your only tools are `git diff` and the two |
There was a problem hiding this comment.
P3 — "Your only tools are git diff and the two review endpoints" is accurate for Bash, but the action's built-in file tools (Read/Grep/Glob) are still available and the paragraph later asks the reviewer to read the files the diff touches. Consider "Your only shell commands are …" so the model doesn't skip reading surrounding context.
There was a problem hiding this comment.
Fixed in 96ae908: the paragraph now says Read, Grep and Glob work on the pinned checkout and that the only shell commands are git diff and the two review endpoints.
Antigravity (agy) review — informationalModel: gemini-3.8-flash-high · commit No significant issues found. |
|
Claude finished @mashkovd's task in 24s —— View job Review: approved (0 P1, 0 P2, 0 P3)
The new paragraph is static text with no |
Antigravity (agy) review — informationalModel: gemini-3.8-flash-high · commit No significant issues found. |
What and why
On mctl-academy#322 the reviewer read the repository's
CLAUDE.mdand triednpm ciandnpm run lint:content. The narrowed--allowedToolsrefused both, and the reviewer then stopped with "Verdict: not submitted. I could not run the lint or tests": no inline comments and no review.REVIEW_PROMPTnever says the review is static, so the model read the refusal as a reason to withhold judgement.This adds one paragraph to
REVIEW_PROMPT, which both review steps (primary and fallback token) share. The paragraph says:git diffand the two review endpoints;Not changed: the tool allowlist. Allowing
npm(or adding it to a base image) would executepackage.jsonscripts and install hooks from the PR head in a job that holdsCLAUDE_CODE_OAUTH_TOKENand apull-requests: writetoken. That is the PR-controlled-input case AGENTS.md rules out.Callers pin this workflow by SHA, so each repository picks the change up on its next pin bump. mctl-academy is bumped in a follow-up.
Checks
actionlint .github/workflows/claude-review.ymlclean, YAML parses🤖 Generated with Claude Code
https://claude.ai/code/session_01KMPGAe5mmsUMmPD9AZP8Zk