Skip to content

docs: competitive gap analysis for CodeRabbit-class replacement - #10

Open
jaibhasin wants to merge 10 commits into
mainfrom
cursor/review-quality-research-aee9
Open

docs: competitive gap analysis for CodeRabbit-class replacement#10
jaibhasin wants to merge 10 commits into
mainfrom
cursor/review-quality-research-aee9

Conversation

@jaibhasin

@jaibhasin jaibhasin commented Jul 28, 2026

Copy link
Copy Markdown
Owner

Summary

Implements the do-now improvements from the competitive gap analysis, plus the research docs that scoped the work.

Shipped

  1. Docs alignment with live primary + verifier architecture
  2. OpenRouter 429/5xx retries (reserve-once, semaphore released between attempts)
  3. Configurable min_permission (admin default; maintain/write supported via Action/CLI/.prbot.toml)
  4. Walkthrough section in the summary comment (soft-fail, no tools)
  5. Risk-scaled depth (DepthPlan for passes/steps)
  6. Multipass primary review with cluster/majority merge (default primary_passes=1)
  7. Resolution-rate tracking in SummaryState v4
  8. Eval scaffolding: catalog preservation + run_fixture_batch.py (human adjudication still required for hard gate)

Defaults stay conservative

  • primary_passes=1
  • min_permission=admin
  • Walkthrough soft-fails and never blocks publish
  • Offline quality gate still uses smoke sample until fixtures are adjudicated

Test plan

  • cargo test
  • cargo clippy --all-targets -- -D warnings
  • python3 scripts/evaluate.py evals/sample.jsonl --allow-small-sample
  • python3 scripts/run_fixture_batch.py --help
Open in Web Open in Cursor 

Summary by CodeRabbit

  • Documentation
    • Added a competitive analysis comparing the review experience with leading code-review tools.
    • Documented product gaps and opportunities across review quality, investigation depth, resilience, collaboration, and repository context.
    • Expanded the future checklist with measurable quality metrics, retry guidance, review strategies, and documentation alignment.
    • Added an implementation roadmap outlining prioritized improvements and completion criteria.

Capture codebase and market research on what PRBot should improve
next to build replacement confidence: evals, multi-pass recall,
walkthrough UX, and operational gaps versus CodeRabbit and Bugbot.

Co-authored-by: Jai Bhasin <jaibhasin@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@cursor[bot], you've reached your PR review limit, so we couldn't start this review.

Next review available in: 45 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ad4e9130-adfb-4135-aefb-dbca53650ecb

📥 Commits

Reviewing files that changed from the base of the PR and between 1d54c6e and fdd7aca.

📒 Files selected for processing (35)
  • .github/workflows/ci.yml
  • AGENTS.md
  • CHANGELOG.md
  • Cargo.toml
  • README.md
  • action.yml
  • docs/research/future_checklist.md
  • entrypoint.sh
  • evals/fixtures/README.md
  • evals/fixtures/catalog.jsonl
  • evals/router/README.md
  • examples/prbot.yml
  • scripts/generate_fixture_catalog.py
  • scripts/run_fixture_batch.py
  • src/agents/cluster.rs
  • src/agents/depth.rs
  • src/agents/integration_tests.rs
  • src/agents/mod.rs
  • src/agents/prompts/mod.rs
  • src/agents/prompts/primary.rs
  • src/agents/prompts/walkthrough.rs
  • src/agents/verifier.rs
  • src/agents/walkthrough.rs
  • src/config.rs
  • src/github/client.rs
  • src/github/tests.rs
  • src/llm.rs
  • src/reporting/summary.rs
  • src/reporting/summary_tests.rs
  • src/review/commands.rs
  • src/review/contextual.rs
  • src/review/legacy.rs
  • src/review/mod.rs
  • src/review/tests.rs
  • src/types.rs
📝 Walkthrough

Walkthrough

The PR adds research and planning documentation covering PRBot’s competitive gaps, prioritized improvements, implementation sequencing, evaluation gates, review-depth scaling, multi-pass review, permission policy, retries, walkthroughs, and resolution-rate tracking.

Changes

Review strategy and implementation roadmap

Layer / File(s) Summary
Competitive analysis and prioritization
docs/research/competitive_gap_analysis.md
Documents PRBot’s current review architecture, competitor comparisons, measurable quality gaps, deferred priorities, and staged roadmap.
Prioritized future checklist
docs/research/future_checklist.md
Updates immediate actions, later improvements, industry ideas, review metrics, and supporting sources.
Foundational implementation sequencing
docs/research/implementation_plan_do_now.md
Defines build order and plans documentation alignment, OpenRouter retries, and configurable collaborator permissions.
Review pipeline improvements
docs/research/implementation_plan_do_now.md
Plans walkthrough generation, risk-scaled depth, multi-pass primary review, clustering, and majority merging.
Quality gates and resolution lifecycle
docs/research/implementation_plan_do_now.md
Plans evaluation fixtures, CI gating, fingerprint lifecycle fields, resolution-rate tracking, dependencies, and completion criteria.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • jaibhasin/PRBot#8: Updates the primary-reviewer and verifier architecture that these research and planning documents reference.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is specific and accurately reflects the docs-only competitive analysis around CodeRabbit-class replacement.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/review-quality-research-aee9

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

@jaibhasin
jaibhasin marked this pull request as ready for review July 28, 2026 17:25
@cursor

cursor Bot commented Jul 28, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

cursoragent and others added 2 commits July 28, 2026 17:27
Map each priority item onto concrete files, algorithms, config knobs,
tests, and small-commit sequencing against the current codebase.

Co-authored-by: Jai Bhasin <jaibhasin@users.noreply.github.com>
Co-authored-by: Jai Bhasin <jaibhasin@users.noreply.github.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/research/competitive_gap_analysis.md`:
- Around line 69-81: The comparison claims in
docs/research/competitive_gap_analysis.md lines 69-81 need direct source links
for the 2026 industry comparisons; add authoritative links supporting each
applicable row, or explicitly label unsupported table content as author
synthesis. In docs/research/future_checklist.md lines 33-40, add direct sources
for the CodeRabbit capability claims and keep the existing bullet scope aligned
with those linked sources if broader support is unavailable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7cb14bbe-c942-46fb-8b4e-38b287ea7944

📥 Commits

Reviewing files that changed from the base of the PR and between 673966d and 1d54c6e.

📒 Files selected for processing (3)
  • docs/research/competitive_gap_analysis.md
  • docs/research/future_checklist.md
  • docs/research/implementation_plan_do_now.md

Comment thread docs/research/competitive_gap_analysis.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/research/implementation_plan_do_now.md`:
- Around line 363-367: Update the “Diversified passes (deterministic)” heading
to describe only reproducible pass ordering, since passes 1 and 2 use nonzero
temperatures; alternatively, set all listed pass temperatures to 0.0 if
deterministic model output is required.
- Around line 379-388: Update the merge quorum rule in the pass-merging logic so
majority_k represents a true majority, computing it as floor(primary_passes / 2)
+ 1 rather than defaulting to 2 for two or more passes. Preserve the existing
singleton, representative-selection, candidate-cap, and failure-policy behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a9b20ad2-79f5-43d6-9913-778d494f4273

📥 Commits

Reviewing files that changed from the base of the PR and between 673966d and 1d54c6e.

📒 Files selected for processing (3)
  • docs/research/competitive_gap_analysis.md
  • docs/research/future_checklist.md
  • docs/research/implementation_plan_do_now.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/research/future_checklist.md

Comment on lines +363 to +367
Diversified passes (deterministic):

1. Pass 0: current order, temperature `0.0`, full review
2. Pass 1: reversed file order, correctness/reliability lens, temperature `0.1`
3. Pass 2: high-risk bundles first, security/concurrency/API lens, temperature `0.2`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not call nonzero-temperature passes deterministic.

Passes 1 and 2 use temperatures 0.1 and 0.2, so their model outputs remain stochastic. Rename this to “reproducible pass ordering” or set all temperatures to 0.0 if deterministic output is required.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/research/implementation_plan_do_now.md` around lines 363 - 367, Update
the “Diversified passes (deterministic)” heading to describe only reproducible
pass ordering, since passes 1 and 2 use nonzero temperatures; alternatively, set
all listed pass temperatures to 0.0 if deterministic model output is required.

Comment on lines +379 to +388
Merge rules:

- Keep if support >= `majority_k` (default 2 when passes >= 2)
- Or singleton with confidence >= ~0.92 and priority in `{P0,P1}`
- Representative = highest confidence, then highest priority, then richest body/evidence
- Cap merged candidates before verifier (for example `max_comments * 3`)

Then call existing `verifier::verify_findings` unchanged.

Failure policy: a failed pass contributes empty findings; only mark primary failed if all passes fail.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Define a true majority quorum.

When primary_passes = 2, majority_k = 2 requires unanimity rather than a majority. Either compute the quorum as floor(passes / 2) + 1 or rename the setting to clarify that two-pass mode intentionally requires unanimous support.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/research/implementation_plan_do_now.md` around lines 379 - 388, Update
the merge quorum rule in the pass-merging logic so majority_k represents a true
majority, computing it as floor(primary_passes / 2) + 1 rather than defaulting
to 2 for two or more passes. Preserve the existing singleton,
representative-selection, candidate-cap, and failure-policy behavior.

cursoragent and others added 7 commits July 28, 2026 17:34
Clarify that the shipped product uses one primary reviewer plus an
independent verifier. Specialist routing remains eval/future work.

Co-authored-by: Jai Bhasin <jaibhasin@users.noreply.github.com>
Mirror GitHub client retry behavior for transient provider failures.
Reserve budget once per logical completion and release the semaphore
between attempts so multipass work can proceed under rate limits.
Also plumb AgentCall.temperature for upcoming diversified passes.

Co-authored-by: Jai Bhasin <jaibhasin@users.noreply.github.com>
Allow admin, maintain, or write as the review/command permission floor.
Default remains admin for backward compatibility. Also add primary_passes
and related ReviewConfig knobs used by upcoming depth/multipass work.

Co-authored-by: Jai Bhasin <jaibhasin@users.noreply.github.com>
Plan review effort from bundle risk, diversify optional primary passes,
and majority-merge candidates before the existing verifier. Default
primary_passes remains 1 so behavior stays conservative until evals
justify enabling more passes.

Co-authored-by: Jai Bhasin <jaibhasin@users.noreply.github.com>
Generate a soft-fail human walkthrough for the summary comment and track
finding resolution across incremental fingerprint invalidation. Summary
state moves to version 4 with published/resolved fingerprint sets.

Co-authored-by: Jai Bhasin <jaibhasin@users.noreply.github.com>
Preserve adjudicated catalog rows when regenerating stubs, add a draft
--eval-json batch runner, and tighten CI checks around the fixture flow.

Co-authored-by: Jai Bhasin <jaibhasin@users.noreply.github.com>
Co-authored-by: Jai Bhasin <jaibhasin@users.noreply.github.com>
@jaibhasin

Copy link
Copy Markdown
Owner Author

@codex please analyze the codechanges made in the repo, check if they were needed or not , see if u can improve them. Also check for other structures of the repo as u are reviewing.

Make sure docs are updates, concise, not ambigious, can be easily understood and updated

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fdd7aca0ba

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/agents/cluster.rs
Comment on lines +46 to +49
cluster.candidates.iter().any(|finding| {
finding.confidence >= keep_high_confidence_singleton
&& matches!(finding.priority, Priority::P0 | Priority::P1)
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Bypass singleton voting when only one pass runs

With the shipped defaults primary_passes=1 and majority_k=2, every cluster has support 1, so this condition retains only P0/P1 findings with confidence at least 0.92. All P2/P3 findings and lower-confidence P0/P1 findings are discarded before independent verification, allowing the default review path to report clean despite actionable candidates; accept all candidates when only one pass executed, or derive the threshold from the actual pass count.

AGENTS.md reference: AGENTS.md:L25-L28

Useful? React with 👍 / 👎.

Comment thread src/review/mod.rs
Comment on lines +109 to +110
let min_permission = CollaboratorPermission::parse(&args.min_permission)?;
if !eval_json && !github.has_min_permission(&actor, min_permission).await? {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Honor repository permission configuration during authorization

When a repository uses the documented .prbot.toml setting min_permission = "write", this check still uses the CLI/Action argument, which defaults to admin, because the trusted repository configuration is loaded later by prepare_snapshot. Write and maintain collaborators are therefore rejected before that configuration can be read, while a stricter repository value likewise cannot tighten a permissive Action input; load the trusted permission setting before authorizing or remove repository-level support.

Useful? React with 👍 / 👎.

Comment on lines +79 to +83
# Eval payload is the last JSON object printed.
lines = [line for line in completed.stdout.splitlines() if line.strip().startswith("{")]
if not lines:
raise SystemExit(f"no JSON payload for {case['case_id']}: {completed.stdout}")
return json.loads(lines[-1])

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Parse the complete pretty-printed eval payload

--eval-json prints its payload with serde_json::to_string_pretty, so even an empty result spans multiple lines and this filter normally captures only the standalone opening {; with findings, it can instead select a nested object's opening {. Consequently json.loads(lines[-1]) raises JSONDecodeError for every ready fixture, preventing this runner from producing release-gate drafts; decode the complete trailing JSON document rather than a single line.

AGENTS.md reference: AGENTS.md:L45-L45

Useful? React with 👍 / 👎.

Comment thread src/reporting/summary.rs
Comment on lines 20 to +23
#[serde(default)]
pub published_fingerprints: BTreeSet<String>,
#[serde(default)]
pub resolved_fingerprints: BTreeSet<String>,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Seed publication history when migrating v3 summary state

Existing v3 summary comments deserialize these new sets as empty even though fingerprints contains previously published active findings. If the first incremental v4 review fixes one of those findings, forget_paths returns its fingerprint but resolve_forgotten refuses to count it because it is absent from published_fingerprints, so pre-upgrade findings and their resolutions permanently disappear from the reported rate; migrate v3 state by seeding publication history from the active fingerprints.

Useful? React with 👍 / 👎.

Comment thread src/reporting/summary.rs
state: &SummaryState,
review_model: &str,
verification_model: &str,
walkthrough: Option<&str>,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P3 Badge Update the render_summary documentation for walkthrough

After adding this required argument, the immediately preceding Rustdoc example still calls render_summary with seven arguments and the parameter list does not describe walkthrough. Because the example is marked ignore, documentation tests will not expose the stale invocation, and readers copying it receive code that does not compile; add the argument and document its behavior.

Useful? React with 👍 / 👎.

@jaibhasin

Copy link
Copy Markdown
Owner Author

@codex please commit the changes

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

  • No commit was created because the current branch, work, has no modified, staged, or untracked files.
  • The branch remains at commit fdd7aca (docs: mark shipped do-now improvements in changelog and checklist).
  • No pull request was created because there were no new changes to commit.

Checks

  • git status --short - working tree is clean.
  • git branch --show-current - current branch is work.
  • git log -5 --oneline - confirmed the existing branch HEAD and recent commits.

View task →

@jaibhasin

Copy link
Copy Markdown
Owner Author

@codex Please implement the changes you have suggested.

@chatgpt-codex-connector

Copy link
Copy Markdown

Summary

Testing

  • NO_PROXY=127.0.0.1,localhost no_proxy=127.0.0.1,localhost cargo test - all 78 tests passed.
  • cargo clippy --all-targets -- -D warnings
  • python3 -m py_compile scripts/run_fixture_batch.py
  • git diff --check
  • git status --short - working tree clean after commit.

View task →

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.

2 participants