feat: local-mode WS terminal failure — pause after N reconnects, typed error (#22)#33
Conversation
- roadmap-2026-05-13-issue-waves.md: groups the 11 open issues into six 2-issue waves with theme, files, ordering rationale, and status placeholders. Tracking doc for the orchestrator. - specs/2026-05-13-ws-terminal-failure-design.md: design for #22 (WebSocket reconnect terminal failure mode). Mirrors the #16 pattern shipped in PR #32: typed RecostLocalUnreachableError through onError, threshold counter (default 20, reuses existing _reconnectAttempts), one-shot stderr line, send() becomes silent no-op once paused, restart-only recovery.
…#22) 12-task plan for Wave 1 Sub-plan A. Mirrors PR #32's structure: 3 setup tasks (types, exports, ResolvedConfig wiring), 1 TDD-red task, 1 implementation+green task with bundled commit, 5 test tasks (threshold trip, send-after-pause no-op, counter reset on successful connect, configurable threshold, cloud-mode-unaffected + idempotency), 1 README docs task, 1 final verification + PR task. Each test is calibrated to keep wall-clock under vitest's default per-test timeout. Roadmap also updated to reference middleware-python#32 (Sub-plan B follow-up issue, filed separately).
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, 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 have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (8)
✨ 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 |
Summary
RecostLocalUnreachableErrorto the public API; sibling to theRecostAuthErrorhierarchy added in PR feat: 401 auth-failure handling — suspend after N, typed errors (#16) #32.maxConsecutiveReconnectFailures(default 20) consecutive failed reconnects. Recovery is restart-only.stderrwarning at the threshold, regardless ofdebugflag.onError(err: Error)signature is unchanged — hosts narrow viainstanceof.Closes #22.
Wave 1 of the issue-waves roadmap (
docs/superpowers/roadmap-2026-05-13-issue-waves.md); Sub-plan B for cross-SDK parity is tracked at recost-dev/middleware-python#32.Branch contents
12 commits — 2 leading docs commits (roadmap + spec, then plan) ride at the head of the implementation branch by intent (combined PR rather than separate docs/impl PRs):
856dce9docs(roadmap): 6-wave issue plan + Wave 1 Sub-plan A spec1938601docs(plan): WS terminal failure implementation planTest plan
npm run test— 235/235 green (228 baseline + 7 new cases)npm run lint— cleannpm run build— clean dual ESM + CJS + DTSonError(RecostLocalUnreachableError)fires, CPU drops to zero.