Story
As a maintainer of the pr-review engine,
I want detect an MCP server connection/init failure during a review and emit a GitHub warning annotation while the review still completes,
so that an unavailable MCP server degrades visibly (Fail Loud, Never Fake) instead of silently dropping context or emitting a fabricated "all clear" verdict.
Acceptance Criteria
- When the claude CLI reports an MCP server failed to connect/initialize, engine.sh emits a
::warning:: annotation naming the affected server and the review continues to completion using the model's base capabilities.
- An MCP failure never causes a fatal exit (no code-1 abort) and never short-circuits to an empty or fabricated "all clear" verdict.
- When MCP is not configured (knob unset), no MCP-related warnings are emitted.
- Behavior is covered by a test that simulates an unreachable server / failure marker in captured CLI output.
Tasks / Subtasks
Dev Notes
- Builds directly on story 1's MCP plumbing in engine.sh.
- Pattern to mirror: engine.sh already emits
::warning:: for throttled models (engine.sh:494) and the review pipeline already degrades-without-fatal-exit on oversized diffs (AGENTS.md 'Oversized PRs': the agent never exits 1 on a 406). Apply the same fail-loud-but-continue shape.
- MCP connection/init errors surface in the CLI's stdout/stderr, captured in _claude_chain_invoke's final_stdout/final_stderr. When choosing a detection marker, AVOID tokens that collide with is_rate_limited()/_rate_limit_pattern — see the explicit caution at engine.sh:489-493 where fallback phrasing is kept clear of rate-limit tokens so downstream callers don't misclassify.
- 'Graceful degradation (Fail Loud, Never Fake)' with disclosed warning annotations is a stated design requirement of MCP-Powered CI Review Enhancement — Standard #650; keep the warning human-readable in the Actions log/step summary.
Project Structure Notes
Confined to scripts/engine.sh and a bats test. No workflow changes.
References
- scripts/engine.sh:494 (existing ::warning:: on model throttle)
- scripts/engine.sh:489 (caution: avoid rate-limit token collisions)
- AGENTS.md#oversized-prs-300-changed-files (never fatal-exit, degrade with note)
- discussion MCP-Powered CI Review Enhancement — Standard #650 (Design item 3: graceful degradation)
Likely target surface
Story prepared by the BMAD Scrum Master (Bob) for epic #676. Status: ready-for-dev.
Story
As a maintainer of the pr-review engine,
I want detect an MCP server connection/init failure during a review and emit a GitHub warning annotation while the review still completes,
so that an unavailable MCP server degrades visibly (Fail Loud, Never Fake) instead of silently dropping context or emitting a fabricated "all clear" verdict.
Acceptance Criteria
::warning::annotation naming the affected server and the review continues to completion using the model's base capabilities.Tasks / Subtasks
::warning::naming the server and ensure the review proceeds and returns its normal verdict (no fatal exit, no empty verdict). (AC: test issue from agent #1, Go-live improvements for PR review agent #2)Dev Notes
::warning::for throttled models (engine.sh:494) and the review pipeline already degrades-without-fatal-exit on oversized diffs (AGENTS.md 'Oversized PRs': the agent never exits 1 on a 406). Apply the same fail-loud-but-continue shape.Project Structure Notes
Confined to scripts/engine.sh and a bats test. No workflow changes.
References
Likely target surface
scripts/engine.shtests/Story prepared by the BMAD Scrum Master (Bob) for epic #676. Status: ready-for-dev.