Enhance address-review with parallel fixes, self-review, and Greptile verification#3121
Enhance address-review with parallel fixes, self-review, and Greptile verification#3121
Conversation
…ptile verification Add four improvements to the address-review workflow inspired by the open-source PR review tool landscape: 1. Parallel sub-agents: When 2+ MUST-FIX items touch different files with no dependencies, spawn parallel sub-agents via Task tool for faster execution. 2. Self-review gate: After making fixes but before committing, run a code-review agent on the diff to catch issues introduced by the fixes themselves, preventing new review cycles. 3. Greptile claim verification: Cross-reference reviewer claims against Greptile's codebase analysis before finalizing MUST-FIX triage, reducing false-positive classifications. 4. pr-review-toolkit integration: The self-review gate uses the pr-review-toolkit:code-reviewer agent when available. Updates both the Claude Code command (.claude/commands/) and the portable workflow prompt (.agents/workflows/) with tool-agnostic equivalents where applicable. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 9 minutes and 6 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Review: Enhance address-review with parallel fixes, self-review, and Greptile verificationThe three new capabilities (Greptile claim verification, parallel sub-agents, self-review gate) are well-motivated and the overall structure is sound. A few issues need attention before merging. Issues1. Both the agents workflow and the Claude commands file introduce "downgrade to
See inline comments on 2. Self-review gate is ordered after push confirmation (agents file)
3. Greptile tool names don't match MCP naming convention (Claude commands file)
4. No failure path for parallel sub-agents
Minor / Nits
What's good
|
Greptile SummaryThis PR enhances the
Confidence Score: 4/5Safe to merge after addressing the sub-agent commit ordering issue; the self-review gate is systematically bypassed under this repo's CLAUDE.md defaults when parallel agents are used. One P1 finding: the parallel sub-agent instructions don't prevent agents from committing (and CLAUDE.md's "commit when confident" default means they will), which empties git diff before the self-review gate runs — defeating the gate's purpose entirely when it's most needed. Two P2 findings are also present (unqualified Greptile tool names, conflicting SKIPPED/DISCUSS triage guidance). The P1 warrants a 4/5 rather than 5/5. .claude/commands/address-review.md — the parallel sub-agent prompt (lines ~270–274) needs an explicit "do not commit" instruction to preserve the self-review gate's effectiveness. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[MUST-FIX items identified] --> B{2+ items in different files?}
B -- Yes --> C[Spawn parallel sub-agents via Task tool]
C --> D[Each agent: make fix + run file-level checks - DO NOT commit]
D --> E[Verify no conflicts between changes]
B -- No --> F[Fix sequentially]
E --> G
F --> G[Self-review gate: git diff on all changes]
G --> H{Critical issues found?}
H -- Yes --> I[Fix immediately before committing]
I --> G
H -- No --> J[Commit + push with user confirmation]
Reviews (1): Last reviewed commit: "Enhance address-review with parallel fix..." | Re-trigger Greptile |
- Resolve DISCUSS vs SKIPPED contradiction: clearly wrong claims → SKIPPED, ambiguous/inconclusive → DISCUSS (both files) - Use fully qualified Greptile MCP tool names with mcp__plugin_greptile_greptile__ prefix - Add explicit "do not commit" instruction for parallel sub-agents to preserve self-review gate effectiveness - Add failure fallback for sub-agents and concrete conflict-verification method (git diff --name-only) - Reorder self-review gate before push confirmation for clearer sequencing Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Address-review summaryScan scope: full history (no prior summary comment) Mattered
Skipped
Next default scan starts after this comment. Say |
| - Do not resolve anything still in progress or uncertain. | ||
| - **Self-review gate**: After making all code changes but before committing, review the diff for issues introduced by the fixes themselves. Check for correctness bugs, style violations, and inconsistencies with surrounding code. Fix critical issues immediately. This prevents new review cycles caused by the fixes. If you have access to a code-review agent or tool, use it; otherwise, do a manual diff review. | ||
| - Ask for push confirmation before running `git push`. | ||
| - **Parallel fixes**: When there are 2+ items to fix that touch different files with no logical dependencies, process them in parallel if your environment supports concurrent execution (e.g., sub-agents, background tasks). Items in the same file or with cross-file dependencies must be fixed sequentially. Instruct each sub-agent **not to commit** — all changes must remain unstaged so the self-review gate can run on the combined diff. After parallel fixes complete, verify no conflicts exist between the changes by checking whether any sub-agents touched the same files (`git diff --name-only`). |
There was a problem hiding this comment.
Ordering bug: "Parallel fixes" lands after "Ask for push confirmation"
The bullet is placed after the push-confirmation line, implying parallel fixes happen post-commit. But the text itself says sub-agents must "not commit — all changes must remain unstaged so the self-review gate can run." The intended execution order is:
- Parallel fixes (pre-commit, during the fixing phase)
- Self-review gate on the combined diff
- Commit
- Ask for push confirmation
- Push
Moving the Parallel fixes bullet to appear before the Self-review gate bullet (and definitely before "Ask for push confirmation") would match the .claude/commands/address-review.md version, which orders them correctly.
| @@ -250,6 +262,34 @@ When addressing items, after completing each selected item (whether `MUST-FIX` o | |||
| If the user selects `DISCUSS` items to address, treat them the same as `MUST-FIX`: make the code change, reply, and resolve the thread. | |||
| If the user selects skipped/declined items for rationale replies, post those replies too. | |||
There was a problem hiding this comment.
Conflict-detection hint is misleading
verify there are no conflicts … by checking whether any sub-agents touched the same files (e.g.,
git diff --name-onlyto list changed files, then check for overlaps)
git diff --name-only lists all files changed in the working tree vs the last commit — it gives you one combined list, not a per-agent list. There is no way to retroactively split that list by which sub-agent touched which file, so "check for overlaps" can't actually be done with this command alone.
To make this actionable, the orchestrator needs to track the expected file scope for each sub-agent before dispatch (e.g., record FILES_AGENT_1="foo.rb bar.rb", FILES_AGENT_2="baz.rb"), then check whether any file appears in more than one agent's list. Alternatively, mention that the agent should note which files it was assigned vs which files git diff --name-only actually shows changed, and flag any unexpected extras.
| If the user selects skipped/declined items for rationale replies, post those replies too. | |
| 3. After all sub-agents complete, verify there are no conflicts between their changes. Before dispatch, record the expected file scope for each sub-agent. After all sub-agents finish, run `git diff --name-only` and compare the changed-file list against each sub-agent's expected scope — any file that falls outside its assigned scope or appears in multiple scopes is a potential conflict requiring manual resolution. |
| When Greptile MCP tools are available (`mcp__plugin_greptile_greptile__*`), cross-reference reviewer claims against Greptile's codebase analysis before finalizing triage classifications: | ||
|
|
||
| 1. For each reviewer comment that asserts a factual claim about the codebase (e.g., "this function doesn't handle null", "this breaks the existing API contract"), query Greptile to verify the claim: | ||
| - Use `mcp__plugin_greptile_greptile__search_greptile_comments` to find prior Greptile analysis of the same code area |
There was a problem hiding this comment.
Hardcoded MCP tool names may drift
mcp__plugin_greptile_greptile__search_greptile_comments and mcp__plugin_greptile_greptile__search_custom_context are embedded as literal strings. If the Greptile plugin is renamed, updated, or configured differently, these names silently fail — the agent falls back to local verification without any warning that the Greptile step was skipped.
Step 5's graceful-fallback rule ("if the tools are not configured or the API fails, proceed with local verification alone") handles runtime unavailability, but there's no indication to the operator when the tool names are stale.
Consider adding a brief note that these names should be confirmed against the current Greptile MCP plugin configuration, or using a comment like # Verify tool names match your installed Greptile MCP plugin version to signal they are configuration-dependent.
| 2. For each independent group, spawn a sub-agent via the Task tool with: | ||
| - The full review comment text and context | ||
| - The file path and line number | ||
| - Instructions to make the specific fix and run any relevant file-level checks |
There was a problem hiding this comment.
Self-review gate: potential for unbounded loops, and no threshold for when to use it
Two small gaps:
-
Loop risk: Steps 3 says "fix critical issues immediately before committing." If the self-review agent itself introduces a new issue (unlikely but possible), the guidance doesn't specify whether to run a second pass or stop. A single-pass cap ("run the self-review once; if it finds new critical issues, fix them and proceed without re-reviewing") would prevent runaway recursion.
-
Overhead for trivial fixes: For a one-line typo fix or a comment change, spawning a code-review sub-agent adds real latency with essentially no benefit. Step 6 already exempts non-code actions; consider also exempting fixes that touch only documentation, comments, or test fixtures where style violations can't cause regressions.
Review: Parallel fixes, self-review gate, and Greptile verificationOverall this is a solid set of improvements to the A few issues worth addressing before merge: Bug: ordering in
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is ON, but it could not run because on-demand usage is turned off. To enable Bugbot Autofix, turn on on-demand usage and set a spend limit in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6f58250. Configure here.
| - Do not resolve anything still in progress or uncertain. | ||
| - **Self-review gate**: After making all code changes but before committing, review the diff for issues introduced by the fixes themselves. Check for correctness bugs, style violations, and inconsistencies with surrounding code. Fix critical issues immediately. This prevents new review cycles caused by the fixes. If you have access to a code-review agent or tool, use it; otherwise, do a manual diff review. | ||
| - Ask for push confirmation before running `git push`. | ||
| - **Parallel fixes**: When there are 2+ items to fix that touch different files with no logical dependencies, process them in parallel if your environment supports concurrent execution (e.g., sub-agents, background tasks). Items in the same file or with cross-file dependencies must be fixed sequentially. Instruct each sub-agent **not to commit** — all changes must remain unstaged so the self-review gate can run on the combined diff. After parallel fixes complete, verify no conflicts exist between the changes by checking whether any sub-agents touched the same files (`git diff --name-only`). |
There was a problem hiding this comment.
Portable prompt orders parallel fixes after self-review gate
Medium Severity
In the portable prompt, the Parallel fixes bullet (line 157) is placed after both the Self-review gate (line 155) and the push-confirmation bullet (line 156). The self-review gate explicitly says "after making all code changes," and the parallel-fixes bullet itself references the self-review gate ("so the self-review gate can run on the combined diff"). The logical execution order is parallel fixes → self-review → push confirmation, matching the Claude Code version in address-review.md, but the portable prompt reverses this. An agent following bullet order would attempt self-review and push confirmation before learning how to execute parallel fixes.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 6f58250. Configure here.
…ages * origin/main: Fix initial page startup race for late-loading client bundles (#3151) chore: apply prettier formatting to tracked docs files (#3153) docs: comprehensive RSC API documentation and registration consolidation (#3140) Split rspec-package-tests into parallel generator/unit shards (#3134) fix: add concurrency groups to long-running CI workflows (#3133) refactor: add RenderRequest, JsCodeBuilder, and RenderingStrategy abstractions (#3094) fix: address deferred review items from PR #2849 (#3093) Add complimentary OSS license policy for React on Rails Pro (#3123) fix: centralize CI docs-only detection and add CLI flag validation (#3091) refactor: replace stub-throw + Object.assign with capability-based composition (#3096) Enhance address-review with parallel fixes, self-review, and Greptile verification (#3121) fix: Doctor no longer fails custom projects for missing bin/dev (#3117) fix: cap webpack <5.106.0 to prevent ExecJS SSR breakage (#3095) Add Rspack + RSC compatibility tests and documentation (#1828) (#3120) Add error scenarios hub and test pages (#2497) docs: document polyfill requirements for web-targeted server bundles (#3092) docs: RSC integration pitfalls from tutorial app (#3087) docs: fix render function/helper API documentation (#3088) Doctor: accept TS/TSX server bundle suffixes (#3111) feat: add CI guard requiring sidebar updates when adding docs (#3089)
… verification (#3121) ## Summary - **Parallel sub-agents**: When 2+ MUST-FIX items touch different files with no dependencies, spawn parallel sub-agents via Task tool for faster execution instead of fixing sequentially - **Self-review gate**: After making fixes but before committing, run `pr-review-toolkit:code-reviewer` on the diff to catch issues introduced by the fixes themselves — prevents new review cycles - **Greptile claim verification**: Cross-reference reviewer claims against Greptile's codebase analysis before finalizing MUST-FIX triage, reducing false-positive classifications - **pr-review-toolkit integration**: The self-review gate uses the code-reviewer agent when available Updates both `.claude/commands/address-review.md` (Claude Code) and `.agents/workflows/address-review.md` (portable prompt) with tool-agnostic equivalents where applicable. Inspired by research into the open-source PR review tool landscape (corylanou, gjoranv, kieranklaassen, dfed, tilomitra, solberg, OpenAI Codex babysit-pr). ## Test plan - [ ] Run `/address-review` on a PR with 3+ MUST-FIX items in different files — verify parallel sub-agents are spawned - [ ] Run `/address-review` on a PR with MUST-FIX items in the same file — verify sequential fixing - [ ] Verify self-review gate catches an intentionally introduced bug in a fix - [ ] Verify Greptile verification downgrades a false-positive reviewer claim to DISCUSS - [ ] Verify graceful fallback when Greptile MCP tools are not available - [ ] Test the portable `.agents/workflows/` prompt in a non-Claude-Code assistant 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk since this only updates workflow/prompt documentation and command guidance, with no production code or runtime behavior changes. > > **Overview** > Updates the `address-review` workflow docs to **tighten triage correctness** by adding explicit claim-verification guidance (including optional Greptile cross-checks) before labeling items `MUST-FIX`. > > Adds execution safeguards and speedups: a **self-review gate** before committing/pushing, and guidance to run **independent fixes in parallel** (with no commits in sub-agents and a post-run conflict check) in both the portable `.agents/workflows` prompt and the Claude command. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 6f58250. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>


Summary
pr-review-toolkit:code-revieweron the diff to catch issues introduced by the fixes themselves — prevents new review cyclesUpdates both
.claude/commands/address-review.md(Claude Code) and.agents/workflows/address-review.md(portable prompt) with tool-agnostic equivalents where applicable.Inspired by research into the open-source PR review tool landscape (corylanou, gjoranv, kieranklaassen, dfed, tilomitra, solberg, OpenAI Codex babysit-pr).
Test plan
/address-reviewon a PR with 3+ MUST-FIX items in different files — verify parallel sub-agents are spawned/address-reviewon a PR with MUST-FIX items in the same file — verify sequential fixing.agents/workflows/prompt in a non-Claude-Code assistant🤖 Generated with Claude Code
Note
Low Risk
Low risk since this only updates workflow/prompt documentation and command guidance, with no production code or runtime behavior changes.
Overview
Updates the
address-reviewworkflow docs to tighten triage correctness by adding explicit claim-verification guidance (including optional Greptile cross-checks) before labeling itemsMUST-FIX.Adds execution safeguards and speedups: a self-review gate before committing/pushing, and guidance to run independent fixes in parallel (with no commits in sub-agents and a post-run conflict check) in both the portable
.agents/workflowsprompt and the Claude command.Reviewed by Cursor Bugbot for commit 6f58250. Bugbot is set up for automated code reviews on this repo. Configure here.