ci: allowlist the tools Claude review needs to post#139
Merged
Conversation
The review workflow ran to success but never posted. #136 granted pull-requests/issues write, which moved it from "0 tool denials, posts nothing" to "1 denial, posts nothing" — the /code-review plugin now tries mcp__github_inline_comment__create_inline_comment but the action's default allowlist blocks it, so the review buffers and is dropped ("No buffered inline comments"). Allowlist that tool plus the gh commands the review reads context with. Auth and the plugin prompt are unchanged — both already work. Note: this can't self-verify — claude-code-action skips its run on any PR that edits its own workflow file (anti-tamper). It activates on the next PR that doesn't touch the workflow. Claude-Session: https://claude.ai/code/session_01HLoiSd2k9EJJ1HPjjDgUgo
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.
What does this PR do?
Adds
claude_args: --allowed-tools ...to the Claude Code Review workflow so it can actually post its review.Why?
The review workflow completes successfully but posts nothing. The failure mode evolved as we narrowed it:
pull-requests: read→ the run never reached the posting tool (permission_denials_count: 0), loggedNo buffered inline comments, posted nothing.pull-requests/issues: write→ the run now tries to post and hitspermission_denials_count: 1, stillNo buffered inline comments.That 1 denial is the
/code-reviewplugin callingmcp__github_inline_comment__create_inline_comment, which isn't in the action's default allowlist. This PR allowlists it, plus thegh pr diff/view/commentcommands the review reads context with. Write permission (#136) was necessary; the allowlist is the missing second half.Auth (
claude_code_oauth_token) and the/code-reviewplugin prompt are unchanged — the logs show both already work.Testing
yaml.safe_load)claude-code-actionskips its run on any PR that edits its own workflow file (anti-tamper guard — we observed this on ci: fix harness drift — Claude review, L4 trigger, Go 1.25.12 #136). This fix activates on the next PR that doesn't touch the workflow; that PR'sclaude-reviewrun should showpermission_denials_count: 0and an actual posted review.Cross-repo checklist
openboot.dev? — NoNotes for reviewer
.github/workflows/change — no repo settings/secrets touched; the tool allowlist is the only change.github-inline-comment-server.ts+ issue #548) and consistent with the observed 0→1 denial transition.https://claude.ai/code/session_01HLoiSd2k9EJJ1HPjjDgUgo