Repository navigation
ci(claude): allow the inline-comment tool so the reviewer can post - #55
Merged
Merged
Conversation
In agent mode (explicit prompt) claude-code-action only mounts the github_inline_comment MCP server when the tool is named in the action-level allowed tools (install-mcp-server.ts gates on hasInlineCommentTools); the code-review plugin's own frontmatter cannot grant it. Every run since #54 ended 'success' with 4-53 permission denials, 'No buffered inline comments', and nothing posted on PRs 46/47/49/50. Pass --allowedTools "mcp__github_inline_comment__create_inline_comment" in claude_args — the same form the action repo's own .github/workflows/claude-review.yml uses — and upload the execution transcript as a short-lived artifact so the next posting failure is diagnosable instead of silent. Signed-off-by: Gonzalo Fleming <[email protected]>
3 tasks done
gonzafg2
added a commit
that referenced
this pull request
Jun 11, 2026
…gs (#56) The plugin's command is explicit (step 7): 'If --comment argument was NOT provided, stop here. Do not post any GitHub comments.' Our prompt never passed it, so every review ran to completion and printed its findings only to the job log — confirmed by the PR #46 run transcript (run 27358953209), which ends with 'No --comment flag provided — no GitHub comments posted' right after compiling four findings. Companion to #55: that PR mounted the github_inline_comment MCP server the posting step needs; this one flips the plugin's own posting switch. Signed-off-by: Gonzalo Fleming <[email protected]>
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.
Summary
Fixes the
claude-reviewworkflow so the code-review plugin can actually post its findings, and uploads the execution transcript as a short-lived artifact so future posting failures are diagnosable.Motivation
Every
claude-reviewrun since #54 has ended green while posting nothing. All four runs of 2026-06-11 (PRs #46, #47, #49, #50) show the same signature in their logs:success, between 4 and 53permission_denials_count, andNo buffered inline commentsfrom the posting step — zero reviews or comments reached any PR. A green check that silently drops every finding is worse than no check.Root cause (verified in the action's source): in agent mode (explicit
prompt:),claude-code-actiononly mounts thegithub_inline_commentMCP server when that tool is named in the action-level allowed tools —src/mcp/install-mcp-server.tsgates onhasInlineCommentToolscomputed from the action'sallowedTools, not from the plugin's command frontmatter. Thecode-reviewplugin'sallowed-tools:frontmatter requestsmcp__github_inline_comment__create_inline_comment, but the action never consults it when deciding which MCP servers to start. Result: the server is never mounted, every posting attempt by the review skill is denied, the/tmp/inline-comments-buffer.jsonlbuffer stays empty, and the posting step finds nothing to publish.The fix
--allowedTools "mcp__github_inline_comment__create_inline_comment"inclaude_args— the exact form the action repo's own dogfooding workflow (.github/workflows/claude-review.ymlinanthropics/claude-code-action) uses for this same purpose.Upload execution transcriptstep (if: always(), 7-day retention) using the action'sexecution_fileoutput, so the next time the reviewer misbehaves we can read what it actually did instead of inferring fromnum_turnsand denial counts.Verification
The fix cannot be exercised from this PR, by design. The
claude-reviewcheck on this PR fails (run27358514428) in the OIDC→app-token exchange with: "Workflow validation failed. The workflow file must exist and have identical content to the version on the repository's default branch" — an anti-tampering guard that rejects any run whose workflow file differs frommain's, precisely the situation of a PR that edits that workflow. The error message itself says this is normal and to be ignored.claude-reviewis not a required check; the required ones (builds, cargo deny) are green here.What was verified instead:
src/mcp/install-mcp-server.ts: thegithub_inline_commentserver is mounted in agent mode only when the tool is in the action-level allowed tools).claude-reviewrun after this merges (e.g. a push to PR docs(adr): draft ADR-0021 — Phase 1 KEXINIT negotiation profile #46/docs(adr): draft ADR-0022 — multi-threaded Tokio, minimal feature set #47/docs(adr): draft ADR-0023 — Phase 1 channel layer scope (single-exec) #49/docs(adr): draft ADR-0024 — Phase 1 structured-log event schema #50): expect a posted review or ~0 permission denials, plus aclaude-review-transcriptartifact on the run. Compare against run27324428632(PR docs(adr): draft ADR-0021 — Phase 1 KEXINIT negotiation profile #46: 53 denials, nothing posted).Type of change
Checklist
git commit -s).Security considerations
No new attack surface: the added flag is static (no untrusted interpolation), and the artifact step's
pathcomes from the action's own output, not from event data. The transcript artifact can contain PR content the reviewer read — all of it already public in this repository — and expires in 7 days.