Skip to content

feat: implement issue #678 — [Phase 1] Graceful degradation: warn (never fake) when an MCP server is unavailable - #717

Merged
don-petry merged 2 commits into
mainfrom
dev-lead/issue-678-20260614-1430
Jun 14, 2026
Merged

feat: implement issue #678 — [Phase 1] Graceful degradation: warn (never fake) when an MCP server is unavailable#717
don-petry merged 2 commits into
mainfrom
dev-lead/issue-678-20260614-1430

Conversation

@don-petry

Copy link
Copy Markdown
Collaborator

Closes #678

Implemented by dev-lead agent. Please review.

…ver fake) when an MCP server is unavailable
@don-petry
don-petry requested a review from a team as a code owner June 14, 2026 14:43
@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 40 minutes and 42 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: 53167164-46b6-4aa9-b321-7312230516f6

📥 Commits

Reviewing files that changed from the base of the PR and between 3ff67db and 3f75216.

📒 Files selected for processing (2)
  • 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-678-20260614-1430

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:44

@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 implements graceful degradation for MCP server connection and initialization failures by scanning CLI output files and emitting a warning without altering the final exit code. It also adds comprehensive unit tests to verify this behavior. A critical issue was identified in the server name extraction pipeline, where a grep failure could trigger 'set -e' and prematurely terminate the script; appending '|| true' to the pipeline is recommended to prevent this.

Comment thread scripts/engine.sh Outdated
@don-petry
don-petry disabled auto-merge June 14, 2026 14:45
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.

@sonarqubecloud

Copy link
Copy Markdown

@don-petry
don-petry disabled auto-merge June 14, 2026 14:47
@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:48

@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: 3f752165d8f38c986caa8e3f356e58c8e0d13140
Review mode: triage-approved (single reviewer)

Summary

Adds warn-and-continue graceful degradation for MCP server connection/init failures in scripts/engine.sh (issue #678), plus 5 bats tests. The new _emit_mcp_failure_warning helper scans captured CLI output and emits a ::warning:: naming the affected server(s) without ever altering final_rc — so the review completes on the model's base capabilities rather than fatal-exiting or faking an all-clear. +117/-0 across 2 files; logic is isolated and control-flow-neutral.

Linked issue analysis

Closes #678. All four acceptance criteria are substantively met: AC#1 (::warning:: names the failed server and review continues), AC#2 (no fatal exit, no fabricated/empty verdict — final_rc untouched), AC#3 (inert when REVIEW_MCP_CONFIG knob is unset), AC#4 (synthetic failure transcripts asserted in tests). Implementation stays confined to engine.sh + a bats file as the issue specified, and the failure regex is deliberately kept clear of rate-limit vocabulary to avoid misclassification into cross-engine fallback, per the issue's dev notes.

Findings

No blocking findings. Prior gemini-code-assist review on the first commit (1ba4da2) flagged a set -e risk: a grep pipeline failure could prematurely terminate the script. Verified resolved in the fix commit (3f75216), which appended '|| true' to the server-name extraction pipeline; the detection grep is also guarded with '|| return 0'. coderabbit review was dismissed (rate-limited). No unresolved human review threads or unanswered questions. Warn-only feature with no control-flow impact and good test coverage (agentic + duck paths, knob-set/unset, named/unnamed server).

CI status

All required checks green. shellcheck, bats, unit-tests, CodeQL (actions + python), SonarCloud (Quality Gate passed), gitleaks secret scan, AgentShield, and dev-lead test suite all SUCCESS; dependency-audit ecosystem sub-jobs and dependabot SKIPPED as expected. mergeStateStatus is BLOCKED only because org-leads review is still required (REVIEW_REQUIRED), not due to any failing check.


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 7daffa4 into main Jun 14, 2026
37 checks passed
@don-petry
don-petry deleted the dev-lead/issue-678-20260614-1430 branch June 14, 2026 15:11
don-petry added a commit that referenced this pull request Jun 14, 2026
…ver fake) when an MCP server is unavailable (#717)

* feat: implement issue #678 — [Phase 1] Graceful degradation: warn (never fake) when an MCP server is unavailable

* 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 15, 2026
…ver fake) when an MCP server is unavailable (#717)

* feat: implement issue #678 — [Phase 1] Graceful degradation: warn (never fake) when an MCP server is unavailable

* 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 21, 2026
…ver fake) when an MCP server is unavailable (#717)

* feat: implement issue #678 — [Phase 1] Graceful degradation: warn (never fake) when an MCP server is unavailable

* 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 23, 2026
…ver fake) when an MCP server is unavailable (#717)

* feat: implement issue #678 — [Phase 1] Graceful degradation: warn (never fake) when an MCP server is unavailable

* 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 23, 2026
…ver fake) when an MCP server is unavailable (#717)

* feat: implement issue #678 — [Phase 1] Graceful degradation: warn (never fake) when an MCP server is unavailable

* 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
…ver fake) when an MCP server is unavailable (#717)

* feat: implement issue #678 — [Phase 1] Graceful degradation: warn (never fake) when an MCP server is unavailable

* 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 Aug 2, 2026
…ver fake) when an MCP server is unavailable (#717)

* feat: implement issue #678 — [Phase 1] Graceful degradation: warn (never fake) when an MCP server is unavailable

* 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 Aug 3, 2026
…ver fake) when an MCP server is unavailable (#717)

* feat: implement issue #678 — [Phase 1] Graceful degradation: warn (never fake) when an MCP server is unavailable

* 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 Aug 3, 2026
…ver fake) when an MCP server is unavailable (#717)

* feat: implement issue #678 — [Phase 1] Graceful degradation: warn (never fake) when an MCP server is unavailable

* 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 Aug 7, 2026
…ver fake) when an MCP server is unavailable (#717)

* feat: implement issue #678 — [Phase 1] Graceful degradation: warn (never fake) when an MCP server is unavailable

* 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 Aug 7, 2026
…ver fake) when an MCP server is unavailable (#717)

* feat: implement issue #678 — [Phase 1] Graceful degradation: warn (never fake) when an MCP server is unavailable

* 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 Aug 7, 2026
…ver fake) when an MCP server is unavailable (#717)

* feat: implement issue #678 — [Phase 1] Graceful degradation: warn (never fake) when an MCP server is unavailable

* 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 Aug 8, 2026
…ver fake) when an MCP server is unavailable (#717)

* feat: implement issue #678 — [Phase 1] Graceful degradation: warn (never fake) when an MCP server is unavailable

* 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 Aug 8, 2026
…ver fake) when an MCP server is unavailable (#717)

* feat: implement issue #678 — [Phase 1] Graceful degradation: warn (never fake) when an MCP server is unavailable

* 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] Graceful degradation: warn (never fake) when an MCP server is unavailable

2 participants