Skip to content

CI: fix silent cache-write warning and silently-dropped inline comments - #29

Open
jnasbyupgrade wants to merge 1 commit into
masterfrom
fix-claude-review-cache-and-inline
Open

CI: fix silent cache-write warning and silently-dropped inline comments#29
jnasbyupgrade wants to merge 1 commit into
masterfrom
fix-claude-review-cache-and-inline

Conversation

@jnasbyupgrade

Copy link
Copy Markdown
Contributor

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.

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.
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6b54710a-7cc5-4a17-80da-a4f0160cd208

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant