Skip to content

feat: implement issue #679 — [Phase 1] Surface the MCP knob to the review workflow without breaking template sync - #716

Merged
don-petry merged 4 commits into
mainfrom
dev-lead/issue-679-20260614-1431
Jun 14, 2026
Merged

don-petry merged 4 commits into
mainfrom
dev-lead/issue-679-20260614-1431

Conversation

@don-petry

Copy link
Copy Markdown
Collaborator

Closes #679

Implemented by dev-lead agent. Please review.

…view workflow without breaking template sync
@don-petry
don-petry requested a review from a team as a code owner June 14, 2026 14:41
@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.

@coderabbitai

coderabbitai Bot commented Jun 14, 2026 •

Copy link
Copy Markdown

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 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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 7eaf2994-00b9-4588-b877-36774bc7c0dd

📥 Commits

Reviewing files that changed from the base of the PR and between 9aa0a2e and 98cb1b8.

📒 Files selected for processing (4)
  • .github/review-mcp.json.sample
  • docs/pr-review-agent/pr-review-agent.md
  • scripts/engine.sh
  • tests/dev-lead/unit/test_engine_mcp.bats
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/issue-679-20260614-1431

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 14, 2026 14:42

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

Comment thread scripts/engine.sh Resolved
@don-petry
don-petry disabled auto-merge June 14, 2026 14:42
coderabbitai[bot]
coderabbitai Bot previously approved these changes Jun 14, 2026
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@don-petry
don-petry enabled auto-merge (squash) June 14, 2026 14:46
@don-petry
don-petry disabled auto-merge June 14, 2026 14:47
@don-petry
don-petry enabled auto-merge (squash) June 14, 2026 15:00
@don-petry
don-petry disabled auto-merge June 14, 2026 15:00
@don-petry

Copy link
Copy Markdown
Collaborator Author

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

Agent reasoning
   - The job completed its review analysis successfully (lines 158-180 in the logs)
   - Assessment determined: no changes needed, all tests pass
   - The git push error (line 187) is expected when there are no changes to commit — this is normal behavior, not a code issue
**CI Results**: All meaningful checks pass
- SonarCloud: success
- Agent Security Scan: success  
- Lint: success
- ShellCheck: success
- All unit tests: pass (469/469 dev-lead tests)
**Files changed**: None (no fixes needed)

@don-petry
don-petry enabled auto-merge (squash) June 14, 2026 15:01
@don-petry
don-petry disabled auto-merge June 14, 2026 15:12
@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 14, 2026 15:17
@don-petry
don-petry disabled auto-merge June 14, 2026 15:28
@sonarqubecloud

Copy link
Copy Markdown

@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 14, 2026 15:30

@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: 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.

@don-petry
don-petry merged commit d8acc70 into main Jun 14, 2026
36 checks passed
@don-petry
don-petry deleted the dev-lead/issue-679-20260614-1431 branch June 14, 2026 15:39
don-petry added a commit that referenced this pull request Jun 14, 2026
…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>
don-petry added a commit that referenced this pull request Jun 18, 2026
…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>
don-petry added a commit that referenced this pull request Jun 25, 2026
…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>
don-petry added a commit that referenced this pull request Jun 25, 2026
…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>
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.

[Phase 1] Surface the MCP knob to the review workflow without breaking template sync

2 participants