Repository navigation
ci(claude): restore code-review plugin (the posting mechanism), add context - #54
Merged
Merged
Conversation
…ontext Root cause of the no-post / permission-denials problem: PR #52 removed the code-review plugin in favour of a pure prompt. But the plugin IS the posting mechanism — the canonical code-review workflow in the claude-code-action docs uses `plugins: code-review@claude-code-plugins` + `/code-review:code-review`. Without it, Claude has no tool to create inline review comments, so it tried gh (denied) and posted nothing. Restore the plugin, and keep the project-aware behaviour two ways the plugin already honours: - CLAUDE.md (read automatically by the plugin) for the review criteria; - --append-system-prompt for the ADR-vs-Rust change-aware lens. Net result is better than the original generic plugin: same robust posting, now with project context and a change-aware lens. Model stays pinned to claude-sonnet-4-6; pull-requests: write retained. Signed-off-by: Gonzalo Fleming <[email protected]>
3 tasks done
gonzafg2
added a commit
that referenced
this pull request
Jun 11, 2026
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]>
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 real root cause of why the reviewer analysed PRs but posted nothing.
What I got wrong, and the fix
In #52 I replaced the
code-reviewplugin with a pure custom prompt. The docs make clear that the plugin is the posting mechanism — the canonical code-review workflow inclaude-code-actionis exactly:Without the plugin, Claude had no tool to create inline review comments. It tried
gh(denied — hence the 14->4 permission denials across #52/#53) and posted nothing (No buffered inline comments). No amount of prompt tweaking fixed it because the mechanism was missing.This PR restores the plugin and keeps project-aware behaviour through the two channels the plugin already honours:
CLAUDE.md— read automatically by the plugin → the review criteria.--append-system-prompt— the ADR-vs-Rust change-aware lens (don't hunt for bugs in ADRs; apply the hard security rules tocrates/).Net result is better than the original generic plugin: same robust posting, now with project context + a change-aware lens. Model stays
claude-sonnet-4-6;pull-requests: writeretained.Type of change
Validation
Like #52/#53 this modifies the review workflow, so its own check will 401 (benign, expected). The real test is the first PR after merge: the reviewer should post inline comments + a summary with zero permission denials this time — because it finally has the posting tool.
Checklist
Honest note
Third iteration on the reviewer (#52 -> #53 -> this). The lesson, now documented: keep the
code-reviewplugin for posting; layer project context viaCLAUDE.md+--append-system-prompt, don't replace the plugin.