CI: fix silent cache-write warning and silently-dropped inline comments - #29
Open
jnasbyupgrade wants to merge 1 commit into
Open
CI: fix silent cache-write warning and silently-dropped inline comments#29jnasbyupgrade wants to merge 1 commit into
jnasbyupgrade wants to merge 1 commit into
Conversation
Two independent fixes to claude-code-review.yml, both confirmed
against this repo's own actual runs:
- actions: write added to permissions -- there is no narrower
cache-write-only scope. Without it the job still succeeds but
silently fails to cache every run ("Cache reservation failed: cache
write denied: token has no writable scopes"), exactly the warning
seen on PR #10's first successful review run.
- claude_args: '--allowedTools mcp__github_inline_comment__create_inline_comment'
added alongside prompt:. A bare prompt: (agent mode) decides which
MCP servers to start from an --allowedTools flag, not from the
invoked plugin's own frontmatter -- without this the inline-comment
tool never exists in the session, so the code-review plugin was
silently falling back to one consolidated comment instead of real
per-line inline comments, with no error at all.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Two independent fixes to `claude-code-review.yml`, both confirmed against
this repo's own actual runs, per new content in a shared handoff doc
(`~/security-notice.md`).
1. Silent cache-write failure. `actions: write` added to `permissions:`
-- there's no narrower cache-write-only scope. Without it the job still
succeeds but silently fails to cache every run, logging `Cache reservation
failed: cache write denied: token has no writable scopes` -- exactly the
warning seen on PR #10's first successful review run (post-#28) once the
workflow actually got that far.
2. Silently-dropped inline PR comments. `claude_args: '--allowedTools
mcp__github_inline_comment__create_inline_comment'` added alongside
`prompt:`. A bare `prompt:` (no `@claude` mention) runs the action in
"agent mode", which decides which MCP servers to start from an
`--allowedTools` flag in `claude_args` -- it does NOT consult the invoked
plugin's own `allowed-tools` frontmatter. Without this, the
`github_inline_comment` MCP server never starts, so the tool doesn't exist
in the session at all (not blocked -- absent). The `code-review` plugin
silently falls back to one consolidated PR comment instead of real per-line
inline comments, with no error or warning (found in
`Postgres-Extensions/cat_tools` PR #62).
Same `pull_request_target` self-verification limitation as always: this
PR's own `claude-review` check runs the OLD workflow from `master` and
can't demonstrate either fix on itself.