Conversation
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This changes the default connection lifecycle for all clients, allowing synchronized but not-yet-ready connections to remain active for up to 75 additional seconds. The scope and tests are clear, but the materially longer production timeout warrants human review. Notes:
No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe connection supervisor now uses a 15-second timeout to reach synchronization and a separate 75-second timeout after synchronization begins. Tests cover delayed readiness and timeout behavior. ChangesConnection timeout handling
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change lets slow server config snapshots arrive without dropping a working connection, while attempts that never reach synchronization still time out after 15 seconds. No merge-blocking issue was found. The change has not been exercised against a real slow server. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to An unresponsive server can keep a connection pending longer, but the wait remains bounded. Readiness and environment-identity checks still precede connection publication, and cancellation remains available. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Out of Scope Changes checkExplanation The incremental diff also changes ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Comment |
89237b2 to
8ad513a
Compare
…budget The 15 second establishment timeout covered the whole connect attempt, including the wait for the first server-config snapshot. A cold server with a large database can take longer than that to answer, so the client tore down a healthy websocket and retried in a loop. Keep 15 seconds for resolving credentials and creating the session, then allow 75 more seconds for the socket to open (already capped at 15) and the snapshot to arrive. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
8ad513a to
592d051
Compare
Problem
A client gives each connection attempt one 15 second budget. It covers resolving credentials, creating the session, opening the socket and receiving the first config snapshot. When a server is slow to build that snapshot (a cold restart with a large database on a loaded machine), the attempt times out with the socket already open and working. The client tears it down and retries against a server that is no faster, and loops. I saw this loop for about 10 minutes. Fixes #14516.
Change
EnvironmentSupervisorkeeps the 15 second budget until the driver reports thesynchronizingstage, which is when the session exists and the socket is opening. From then on the attempt has 75 seconds for the socket to open (still capped at 15 seconds by the RPC session) and for the first config snapshot to arrive. Attempts that never reachsynchronizingtime out after 15 seconds as before. A socket that closes still fails the attempt immediately.The trade-off: a socket that opens but then never delivers a snapshot is now given up on after up to 90 seconds instead of 15. Web, desktop and mobile share this code.
Scope and approval
Fixes triaged bug #14516. One timeout in
packages/client-runtime/src/connection/supervisor.ts. No server, contract or UI changes.Verification
synchronizingand times out at 75 s. It also fails on main.vp test run src/connection/supervisor.test.tsin packages/client-runtime: 39 passed. Typecheck, lint and format are clean on the changed files.Implemented and tested by Claude Sonnet 5.5 and Claude Opus 5.5 in Claude Code, running inside T3 Code. Reviewed by GPT-6 Astra.
🤖 Generated with Claude Code