Skip to content

docs(mcp-review): Context7 A/B eval findings + tool-name fix - #847

Merged
don-petry merged 3 commits into
mainfrom
claude/planner-scope-updates-jxwwzh
Jun 20, 2026
Merged

don-petry merged 3 commits into
mainfrom
claude/planner-scope-updates-jxwwzh

Conversation

@don-petry

@don-petry don-petry commented Jun 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #826 (which wired the zero-auth Context7 MCP server into the PR-review runtime). This records the evaluation asked for by #816's AC #2/#3/#4 and fixes a stale tool name in the doc.

What was tested

A controlled A/B run locally (not via the pr-review/stable CI path — that path is still pinned to the pre-Context7 config; promoting stable is the production rollout and remains a human decision). The eval replicated engine.sh's deep-tier invocation exactly (--mcp-config .github/review-mcp.json --strict-mcp-config --allowed-tools "…,mcp__context7__*", model claude-opus-4-8), isolating Context7 as the single variable across three inlined PR diffs reviewed off vs on:

  • A — TanStack Query v4→v5 upgrade using v4-only useQuery options
  • B — Pydantic v1→v2 bump written against the v1 API
  • C — control: pure-logic bug, no third-party dependency

Findings

Check Result
Connectivity / tools permitted (AC #2 analog) ✅ resolve-library-id + query-docs connect; is_error=false on every call; correct grounded answer with doc citation
Graceful degradation ✅ Unreachable endpoint → review still completes (rc=0), ~no latency
Spontaneous adoption ✅ Both library PRs used Context7 under a neutral prompt; control used zero tools
Correctness delta (off vs on) None — both arms caught the same BLOCKER/HIGH issues; on B the off-arm was marginally more precise
What Context7 added Auditable grounding (cites the real migration guide) + slightly broader sweep advice — but no net-new finding / no changed verdict
Cost when used +~30 s latency, ~2–4× tokens per library review; parity on the control (zero overhead when irrelevant)

Interpretation: plumbing works and the agent uses Context7 with good judgment, but the quality lift on mainstream libs is ≈0 because the base model is already current to Jan 2026. The marginal value concentrates on post-cutoff / long-tail / private deps and auditable citations — which this repo's Bash/YAML PR profile rarely hits.

Also fixed

The live Context7 server exposes exactly two tools — resolve-library-id and query-docs (verified via a direct tools/list JSON-RPC call). The doc previously named a non-existent get-library-docs tool. Production was unaffected because the repo variable uses the mcp__context7__* wildcard, but the doc is now accurate.

Rollout recommendation (unchanged gate)

Keep Context7 wired — zero-cost when irrelevant, auditable grounding when relevant. Favorable enough to promote to pr-review/stable so live reviews exercise it, with honest expectations (near-zero lift on this repo; strong case on library-heavy repos). Promoting stable and any downstream rollout stays a separate, explicit human decision.

Closes the eval tasks on #816.

🤖 Generated with Claude Code


Generated by Claude Code

Summary by CodeRabbit

  • Documentation
    • Updated Phase-2 pilot guidance with clarified configuration parameters
    • Added comprehensive local evaluation results from A/B experiments examining connectivity, tool accessibility, correctness, cost, and latency impacts
    • Provided updated rollout recommendations and conditional planning for future enhancements based on pilot findings

Captures the 2026-06-20 controlled A/B (AC #2/#3/#4 of #816): Context7
connects and its tools are permitted, the agent adopts it spontaneously
on library PRs and skips it on non-library diffs (zero overhead), and the
review-quality delta vs base is ~0 on mainstream libs (base model already
current to Jan 2026) — value concentrates on post-cutoff/long-tail deps
plus auditable grounding. Latency: +~30s per library review, parity
otherwise.

Also fixes a stale tool name: the live Context7 server exposes
resolve-library-id and query-docs (not get-library-docs). The repo
variable uses the mcp__context7__* wildcard so production was unaffected,
but the doc named a non-existent tool.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015VRMMWmqW9nW81jygmea3e
@don-petry
don-petry requested a review from a team as a code owner June 20, 2026 18:35
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Jun 20, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@don-petry, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 58 minutes and 50 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

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 credits.

🚦 How do rate limits work?

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

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, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7c2155b8-8fb4-4d5b-8843-0382ee258682

📥 Commits

Reviewing files that changed from the base of the PR and between 7f91b06 and 5dd92e6.

📒 Files selected for processing (1)
  • docs/initiatives/mcp-powered-review.md
📝 Walkthrough

Walkthrough

The MCP-powered review initiative doc is updated to correct the REVIEW_MCP_ALLOWED_TOOLS wildcard to mcp__context7__* (matching only the two tools the Context7 server actually exposes) and to replace placeholder evaluation text with a concrete dated A/B experiment covering connectivity, degradation, correctness, cost/latency, nudging behavior, and updated rollout guidance.

Changes

Context7 MCP pilot documentation update

Layer / File(s) Summary
Context7 allowlist correction and A/B evaluation writeup
docs/initiatives/mcp-powered-review.md
Corrects the REVIEW_MCP_ALLOWED_TOOLS=mcp__context7__* wildcard to reflect the server's actual exposed tools (resolve-library-id and query-docs). Replaces earlier placeholder evaluation text with a dated local A/B experiment section: a results table covering connectivity/tool permission, graceful degradation, correctness delta, cost/latency, and nudging effects; an interpretation of where Context7 value is concentrated; and updated rollout recommendations including the condition for revisiting the GitHub MCP secret-scanning starter.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related issues

Possibly related PRs

  • petry-projects/.github-private#826 — Both PRs update docs/initiatives/mcp-powered-review.md to align the Context7 pilot with the correct REVIEW_MCP_ALLOWED_TOOLS=mcp__context7__* configuration and rollout guidance.

Suggested labels

needs-human-review

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/planner-scope-updates-jxwwzh

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 and usage tips.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry
don-petry enabled auto-merge (squash) June 20, 2026 18:36

@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 MCP-powered review documentation to specify the correct Context7 tools and adds a detailed evaluation section from a local A/B test. The feedback identifies an inaccuracy regarding the latency tracking capabilities of scripts/pr_review_health.sh and suggests clarifying that live run durations should be monitored via GitHub Actions run history instead.

Comment thread docs/initiatives/mcp-powered-review.md Outdated
@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-06-20T19:36:35Z.

@don-petry
don-petry disabled auto-merge June 20, 2026 18:36
pr_review_health.sh exits early on all-green runs and only analyzes
failed-run logs, so it does not compile latency deltas for successful
runs. Point live-run duration tracking at GitHub Actions run history
instead. Addresses gemini-code-assist review on #847.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015VRMMWmqW9nW81jygmea3e
@don-petry
don-petry enabled auto-merge (squash) June 20, 2026 18:38
@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-06-20T19:38:28Z.

@don-petry
don-petry disabled auto-merge June 20, 2026 18:38
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-bot-comment (no-changes)

Agent reasoning
Issues addressed: 0
Files changed: docs/initiatives/mcp-powered-review.md (documentation only)
Skipped (informational): 0
Status: No actionable issues — quality gate passed with 0 new issues
```

@don-petry
don-petry enabled auto-merge (squash) June 20, 2026 18:40
@don-petry
don-petry disabled auto-merge June 20, 2026 18:40
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — waiting on PR blockers (intent: fix-reviews)

PR: #847
No changes were committed, but the PR still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews). The retry cron will re-attempt automatically. Next attempt after: 2026-06-20T19:11:05Z

@don-petry
don-petry enabled auto-merge (squash) June 20, 2026 18:41
@don-petry
don-petry disabled auto-merge June 20, 2026 19:56
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-reviews (no-changes)

Agent reasoning
Addressed 0 threads:
(no open threads)
Test verification: skipped — no changes made
Files changed: none
```
The PR is in a clean state: all CI checks pass, no reviewer has requested changes, and there are no unresolved review threads. Nothing to do.

@don-petry
don-petry enabled auto-merge (squash) June 20, 2026 19:56

@donpetry-bot donpetry-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.

Automated review — APPROVED ✓

Risk: LOW
Reviewed commit: 9bed4457223311bf0245970fc49494cbe9e242f9
Review mode: triage-approved (single reviewer)

Summary

Docs-only update to docs/initiatives/mcp-powered-review.md (+52/-21, 1 file): records the 2026-06-20 Context7 A/B evaluation (AC #2/#3/#4 of #816) and fixes a stale tool name (get-library-docs -> query-docs). No code, config, workflow, or dependency changes.

Linked issue analysis

No formal closingIssuesReferences, but the PR body and commits tie this to #816's eval ACs (#2/#3/#4). The doc substantively records the requested evaluation findings (connectivity, graceful degradation, spontaneous adoption, correctness/latency deltas) and a rollout recommendation, which is exactly what those ACs asked to capture.

Findings

  • No security-relevant changes: documentation only, no auth/secrets/crypto/migrations/CI-config touched. CONTEXT7_API_KEY is mentioned only as a header name (zero-auth pilot); no secret value present.
  • Verified the one factual claim added by the latest commit (9bed445): scripts/pr_review_health.sh:85-89 does exit 0 on all-green runs and only downloads/analyzes failed-run logs, so the doc's AC#4 latency-tracking note is accurate.
  • The prior gemini-code-assist COMMENTED review (on 39cbade, re: latency tracking) was addressed by commit 9bed445; coderabbitai subsequently APPROVED the head SHA. No unresolved review threads or unanswered human questions.
  • Secret-scan MCP (run_secret_scanning) was not runnable in this context (permission not granted); the gitleaks CI check passed and the diff contains no secret material.

CI status

All gating checks green: Lint, ShellCheck, CodeQL, Analyze (actions/python), SonarCloud, Secret scan (gitleaks), unit-tests, agent-shield/AgentShield, holdout-guard, review/review, Compile agentic workflows — all SUCCESS. dependency-audit ecosystem jobs SKIPPED (no matching ecosystems). The CANCELLED entries are dev-lead agent automation (dispatch/ci-relay), not gating CI. mergeStateStatus BLOCKED is due to the required org-leads human review, which this verdict feeds.


Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.

@sonarqubecloud

Copy link
Copy Markdown

@don-petry
don-petry merged commit 1ff137e into main Jun 20, 2026
23 of 27 checks passed
@don-petry
don-petry deleted the claude/planner-scope-updates-jxwwzh branch June 20, 2026 20:46
@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-06-20T21:46:50Z.

1 similar comment
@donpetry-bot

Copy link
Copy Markdown
Contributor

Advisory bots were rate-limited; auto-approval is withheld until they recover. pr-review-sweep will re-review this PR after 2026-06-20T21:46:50Z.

don-petry added a commit that referenced this pull request Jul 21, 2026
…ub (#1346)

* chore: sync 1 org-standard workflow stub(s) from petry-projects/.github

* chore: dev-lead update (review-changes) [skip ci-relay]

* chore(sonar): add S7637 exemption for pr-auto-review.yml caller stub (#847/#848 opt-in)
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.

3 participants