fix(ci): claude review as inline comments + native blocking#113
Conversation
Switch the Claude review output from "everything in one sticky
comment" to "inline review comments on specific lines + a brief
sticky summary". Inline comments via the
`mcp__github_inline_comment__create_inline_comment` MCP tool become
real PR review threads — they show next to the changed line, must
be resolved before merge (the ruleset's
`required_review_thread_resolution: true` enforces this), and are
the same mechanism Gemini Code Assist uses. No new workflow, no
custom check, no ruleset change — native review-thread resolution
is the blocking signal.
`claude-review.yml`:
- Drop `track_progress: true`. The progress-tracking comment is
redundant once findings land on the lines they refer to.
- Add `claude_args.--allowedTools` enumerating the MCP inline
tool plus the narrow `gh pr` reads the prompt instructs Claude
to use. Without an explicit allow-list, Claude Code's default
tool set doesn't include the inline-comment MCP tool, so the
model fell back to writing everything into the sticky.
- Keep `use_sticky_comment: true` so the summary edits in place
across pushes instead of stacking "Claude reviewed again"
comments.
`.github/prompts/pr-review.md`:
- Spell out the MCP tool call by name and tell Claude to put
line-level findings there.
- Reserve the sticky summary for a short verdict headline
(severity counts + the `Ship it` / `Iterate` / `Block` line).
- Tighten the "what not to comment on" list.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the automated Claude code review process to provide a more integrated and actionable experience. By moving specific findings to inline review threads, the system now utilizes native GitHub features for tracking and resolving feedback, eliminating the need for redundant custom plumbing or additional CI checks while improving the clarity of the review summary. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request updates the .github/prompts/pr-review.md file to transition the review delivery process toward mandatory inline comments for specific issues and a concise sticky summary for the final verdict. Feedback indicates that related documentation like AGENTS.md and CHANGELOG.md must be updated to maintain consistency with this process change. Additionally, the prompt instructions should be adjusted to explicitly require severity tags ([MUST], [SHOULD], [MAY]) and to align the verdict definitions with the existing Repository Style Guide rules to ensure consistent expectations.
Addresses Gemini review feedback on the parent claude-review change:
- AGENTS.md `Review tooling reference` table row for Claude was still
describing the workflow_run + sticky-comment-only behavior. Updated
to reflect: pull_request trigger, inline-comment + sticky-summary
output shape, and that inline threads block merge via the existing
`required_review_thread_resolution` ruleset (so "blocks merge" goes
from "No (advisory)" to "Yes for inline comments").
- AGENTS.md §"Tier 2 — Code review" Claude bullet rewritten to
describe the new HEAD-committer trust gate and the inline-comment
output, and to drop the now-incorrect "runs after every successful
CI" claim.
- Prompt (`.github/prompts/pr-review.md`) now explicitly requires
each inline comment be tagged with exactly one of `[MUST]` /
`[SHOULD]` / `[MAY]`, matching `.gemini/styleguide.md`'s Rule 13 so
both reviewers speak the same language and the author can filter.
- Verdict rules aligned to the styleguide's Rule 19: `Ship it` when
there are no `[MUST]`s and few or no `[SHOULD]`s (previously
required "no findings worth resolving" which was stricter than the
styleguide); `Iterate` keyed on `[MUST]` or multiple `[SHOULD]`s;
`Block` reserved for CRITICAL/HIGH security or data-loss.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
## Two related noise sources Both produce red workflow runs on PR pushes that don't reflect actual problems and were flooding the inbox. ### 1. `claude-review.yml` failing on PRs that edit Claude's own files The Anthropic action runs a self-validation step that fails when its own workflow file (`.github/workflows/claude-review.yml`) or the prompt template (`.github/prompts/pr-review.md`) is in the PR's diff. Every PR touching Claude's wiring (#105, #108, #109, #110, #111, #113, the merge commit of #115) has logged a noisy red Claude check that resolves itself once the change merges. **Fix:** in `claude-review.yml`'s gate step, query the PR's changed files; if either path is in the diff, set `skip=true` and exit 0. The check shows success, the action never runs, the change still takes effect on the next PR's review. ### 2. `dependabot-automerge.yml push failure` ghost runs on every branch push #115 added `reviewers: ${{ replace(env.ADMINS, ',', ' ') }}` to convert the comma-separated `ADMINS` env var to the space-separated form the composite expects. Problem: `replace()` isn't a GitHub Actions expression function. The valid list is `contains`, `startsWith`, `endsWith`, `format`, `join`, `toJSON`, `fromJSON`, `hashFiles`, plus status checks. An unknown function fails workflow validation, and GitHub records a failed run with the file path (not the workflow's `name:`) as the display name and no jobs — every push to any branch since #115 merged. **Fix:** replace the bad expression with a real bash step that uses parameter expansion (`${ADMINS//,/ }`) to write `ADMINS_SPACE` to `$GITHUB_ENV`. The composite's `with:` then references `env.ADMINS_SPACE`. Both steps gated on `update-type == version-update:semver-major` so they only run when actually needed. ## Test plan - [ ] This PR's own Claude check: success (skip-gate catches the self-modification). - [ ] After merge, branch pushes no longer trigger the ghost `.github/workflows/dependabot-automerge.yml push failure` runs. - [ ] Next major-version Dependabot PR: both admins assigned correctly via `ADMINS_SPACE`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
What changes
Switch Claude review output from "one sticky comment with everything in it" to "inline review comments on specific lines + a short sticky summary".
Inline comments via the
mcp__github_inline_comment__create_inline_commentMCP tool become real PR review threads — they show next to the line they refer to in the diff, can be replied to and resolved, and are the same mechanism Gemini Code Assist uses.Native blocking, no new check
The ruleset already has
required_review_thread_resolution: true. Unresolved Claude inline threads block merging until someone resolves them. That gives reviewers and submitters the "click and resolve" UX you were asking about — same as the Copilot/Gemini flow — without adding a new GitHub Action workflow, a new required check on the ruleset, or any extra custom plumbing.Files
.github/workflows/claude-review.yml:claude_argsallowing the inline-comment MCP tool + thegh prreads the prompt uses. Without an explicit allow-list, Claude Code's default tool set doesn't include the MCP inline-comment tool, so the model was falling back to dumping everything in the sticky.track_progress: true. The progress-tracking comment is redundant once findings land on the lines they refer to.use_sticky_comment: trueso the verdict summary edits in place across pushes (no comment accretion)..github/prompts/pr-review.md:Ship it/Iterate/Block).Test plan
🤖 Generated with Claude Code