Repository navigation
feat: implement issue #679 — [Phase 1] Surface the MCP knob to the review workflow without breaking template sync - #716
Conversation
…view workflow without breaking template sync
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
More reviews will be available in 7 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 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ 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 |
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
There was a problem hiding this comment.
Code Review
This pull request introduces an opt-in mechanism for MCP reviews by falling back to a conventional committed configuration path (.github/review-mcp.json) when REVIEW_MCP_CONFIG is not explicitly set. It also adds documentation and unit tests for this behavior. The review feedback points out a logical issue in scripts/engine.sh where explicitly setting REVIEW_MCP_CONFIG to an empty string to disable MCP reviews would still trigger the fallback if the conventional file exists. It is recommended to check if the variable is unset rather than empty, and to add a corresponding unit test to verify this behavior.
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
|
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 98cb1b8b5633285e7cd0b4294249463d0919de8f
Review mode: triage-approved (single reviewer)
Summary
Phase-1 opt-in MCP knob for the review engine. Adds a committed-file-only enablement convention in scripts/engine.sh (resolve REVIEW_MCP_CONFIG from explicit env, else fall back to .github/review-mcp.json only when present), an inert no-auth Context7 sample, docs, and thorough unit tests. Off by default; no org-template workflow edit; no secrets.
Linked issue analysis
Closes #679. All four acceptance criteria met: (1) engine.sh resolves REVIEW_MCP_CONFIG from env with a conventional-path fallback gated on file existence; (2) repos that don't opt in see no behavior change (verified by the 'conventional file absent' test); (3) committed-file-only path chosen — pr-review.yml untouched, justified in the PR/docs per AGENTS.md template-sync constraint; (4) Context7 sample committed as documentation-only and inert (test asserts .github/review-mcp.json is absent in-repo).
Findings
No blocking findings. The gemini-code-assist review (against the initial commit e67b3a6) flagged that an explicitly-empty REVIEW_MCP_CONFIG could still trigger the fallback. This is correctly handled at head: the guard is [ -z "${REVIEW_MCP_CONFIG+x}" ] (true only when UNSET, not when empty), and a dedicated test ('explicit empty REVIEW_MCP_CONFIG disables conventional path fallback') locks the behavior in. Precedence (explicit env over conventional path) is also tested. The resolved knob is exported so review-one-pr.sh / review-batch.sh subprocesses see it. CodeRabbit's review was dismissed; no unresolved REQUEST_CHANGES threads remain.
CI status
All checks green or appropriately skipped. SUCCESS: Lint, ShellCheck, CodeQL (actions/python), SonarCloud, CodeRabbit, Agent Security Scan, Secret scan (gitleaks), unit-tests, bats, validate-fixtures, and the full Dev-Lead test matrix. SKIPPED: inapplicable dependency-audit ecosystems and dependabot-automerge. No FAILURE or CANCELLED checks. mergeStateStatus is BLOCKED only on the required org-leads human approval.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.
…view workflow without breaking template sync (#716) * feat: implement issue #679 — [Phase 1] Surface the MCP knob to the review workflow without breaking template sync * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…view workflow without breaking template sync (#716) * feat: implement issue #679 — [Phase 1] Surface the MCP knob to the review workflow without breaking template sync * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…view workflow without breaking template sync (#716) * feat: implement issue #679 — [Phase 1] Surface the MCP knob to the review workflow without breaking template sync * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…view workflow without breaking template sync (#716) * feat: implement issue #679 — [Phase 1] Surface the MCP knob to the review workflow without breaking template sync * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>



Closes #679
Implemented by dev-lead agent. Please review.