fix: Busy responses now use the standard error envelope#1491
Conversation
Return server_busy failures through the same Success/Error JSON shape as other CLI errors so consumers can parse one error schema consistently.
|
Warning Review limit reached
Next review available in: 11 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. 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, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR removes the specialized "busy status" error envelope path in the CLI error handling. The ChangesUnified error envelope for server busy errors
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
cli/common/errors/error_envelope_test.go (1)
328-330: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMisleading failure message.
The
t.Fatalfmessage says "tool names mismatch" but this assertion checksenvelope.Success, not tool names. Copy-paste artifact that will confuse debugging on failure.🐛 Proposed fix
if envelope.Success { - t.Fatalf("tool names mismatch: %#v", envelope) + t.Fatalf("busy envelope reported success: %#v", envelope) }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@cli/common/errors/error_envelope_test.go` around lines 328 - 330, The failure message in the `TestErrorEnvelope` assertion is misleading because it checks `envelope.Success` but reports a "tool names mismatch". Update the `t.Fatalf` message in this test to describe the actual `envelope.Success` expectation, using the surrounding `TestErrorEnvelope`/`envelope.Success` check so failures clearly reflect the condition being validated.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@cli/common/errors/error_envelope_test.go`:
- Around line 328-330: The failure message in the `TestErrorEnvelope` assertion
is misleading because it checks `envelope.Success` but reports a "tool names
mismatch". Update the `t.Fatalf` message in this test to describe the actual
`envelope.Success` expectation, using the surrounding
`TestErrorEnvelope`/`envelope.Success` check so failures clearly reflect the
condition being validated.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 78245d1c-3259-400a-b916-fbfef96fae58
📒 Files selected for processing (5)
cli/common/errors/busy_status.gocli/common/errors/error_envelope.gocli/common/errors/error_envelope_test.gocli/dispatcher/shared-inputs-stamp.jsoncli/project-runner/shared-inputs-stamp.json
💤 Files with no reviewable changes (2)
- cli/common/errors/error_envelope.go
- cli/common/errors/busy_status.go
There was a problem hiding this comment.
1 issue found across 5 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Align the failure message with the assertion so future test failures point at the actual unified-envelope check.
Summary
User Impact
Changes
Verification