fix(connections): avoid provider refresh storms on reconnect - #11456
fix(connections): avoid provider refresh storms on reconnect#11456Bil0000 wants to merge 1 commit into
Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This targeted reconnect fix removes provider probes from each server-config connection, but also raises the client’s default connection-establishment timeout from 15 to 45 seconds. That production default changes connection failure and retry timing and merits human review. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe server subscription no longer triggers provider refreshes. The connection supervisor now allows 45 seconds for establishment, with tests covering slow setup, reconnects, and timeout behavior. ChangesServer configuration subscription
Connection establishment timeout
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The subscription path now serves cached snapshots without triggering provider refreshes, and the longer establishment timeout is covered for slow setup, reconnect, timeout, relay, and wakeup behavior. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Each reconnect started a full provider refresh, adding CPU load and repeated catalog updates. Slow but healthy setup could then exceed the 15-second deadline and start the same work again.
Serve cached provider status and use the existing background refreshes. Give complete connection setup 45 seconds; keep the existing socket-open and heartbeat limits. T3 Connect and the native launcher stay unchanged.
Verified: 368 focused tests pass, including 26-second direct/relay setup, reconnects, timeout cleanup, provider updates, and shell/thread sync. The new regression cases fail on main. Client/server typechecks, scoped lint, formatting, and CodeRabbit review pass.
A stalled setup can now wait up to 45 seconds before retrying. This does not fix Cloudflare network outages.
Model: GPT-6. Harness: Codex.
Summary by CodeRabbit