Skip to content

fix(ci): claude review as inline comments + native blocking#113

Merged
EricAndrechek merged 2 commits into
mainfrom
claude-review-inline
May 12, 2026
Merged

fix(ci): claude review as inline comments + native blocking#113
EricAndrechek merged 2 commits into
mainfrom
claude-review-inline

Conversation

@EricAndrechek

Copy link
Copy Markdown
Member

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_comment MCP 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:

    • Add claude_args allowing the inline-comment MCP tool + the gh pr reads 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.
    • Drop track_progress: true. The progress-tracking comment is redundant once findings land on the lines they refer to.
    • Keep use_sticky_comment: true so the verdict summary edits in place across pushes (no comment accretion).
  • .github/prompts/pr-review.md:

    • Tell Claude explicitly to use the MCP inline-comment tool for line-level findings.
    • Reserve the sticky summary for a short verdict line (severity counts + Ship it / Iterate / Block).
    • Tightened the "don't bother commenting on this" list.

Test plan

  • Next push to PR docs: add initial Astro-based documentation site #7 (or any internal PR): findings appear as inline review comments at specific lines; the sticky comment carries a short verdict summary.
  • Inline comments require resolution before the ruleset lets the PR merge.
  • No accumulation of sticky comments across pushes — the existing one edits in place.

🤖 Generated with Claude Code

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>
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, 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

  • Improved Review UX: Transitioned Claude review output from a single sticky comment to inline review threads, providing a native GitHub 'click-to-resolve' experience.
  • Native Blocking: Leveraged existing repository rulesets requiring thread resolution to block PR merges until Claude's inline feedback is addressed.
  • Prompt Refinement: Updated the review prompt to enforce the use of the inline comment MCP tool and restrict the sticky comment to a concise verdict summary.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/claude-review.yml
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions github-actions Bot added github_actions Pull requests that update GitHub Actions code area/infra CI, build, deploy, Docker, release labels May 12, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/prompts/pr-review.md
Comment thread .github/prompts/pr-review.md
Comment thread .github/prompts/pr-review.md Outdated
@EricAndrechek EricAndrechek changed the title fix(ci): claude review as inline comments, native blocking via thread resolution fix(ci): claude review as inline comments + native blocking May 12, 2026
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>
@github-actions github-actions Bot added the area/docs Documentation, site/, README label May 12, 2026
@EricAndrechek EricAndrechek merged commit 13ee45d into main May 12, 2026
13 of 15 checks passed
@EricAndrechek EricAndrechek deleted the claude-review-inline branch May 12, 2026 16:18
@github-project-automation github-project-automation Bot moved this from Backlog to Done in WaveHouse Task Board May 12, 2026
EricAndrechek added a commit that referenced this pull request May 12, 2026
## 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation, site/, README area/infra CI, build, deploy, Docker, release github_actions Pull requests that update GitHub Actions code

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant