Repository navigation
Conversation
Skip the resume check when iOS only went inactive, and give the quick liveness probe and the cached T3 Connect ticket 6s instead of 3s so a high-latency, lossy link is not mistaken for a dead one.
A health check on a slow link timed out after the quick 6s window even while pongs and stream data were still arriving, dropping a working connection. Count socket reads in the RPC session, and when the probe window expires with new data received, wait another window, capped at the full 15s probe timeout.
Pings now run every 3 seconds, so a working idle link always delivers a frame inside the 6 second quick probe window. A probe that a retry shortened now extends by the retry's window, not the original one. A mobile refocus without a background visit sends application-refocused, which restarts the retry ladder and checks for a better route but does not probe the live session. Adds a test of the read counter against real pongs.
Review follow-ups for the slow-link probe changes: - Count each WebSocket frame as it arrives, with a message listener on the session's socket, instead of counting read-loop pulls. A read loop held up by a full stream buffer no longer hides a link that still delivers. The session field is now receivedFrames. - Keep Effect's 5 second ping interval. Delivery is in order, so a pong for a ping sent after the probe arrives after the probe's answer and cannot extend it. The 3 second interval only added ping traffic on every client. - Comments no longer promise a frame in every probe window. The local window variable is now probeWindow, so it does not shadow the DOM global. - Shell and thread tests check that a mobile refocus does not resubscribe. - The connection runtime doc describes the probe extension and the refocus. Co-authored-by: Nick <1109914+nick-potts@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — This PR changes default connection and cached-ticket timeouts and modifies central WebSocket, mobile lifecycle, and authorization behavior. Those production defaults and authorization-path changes require human review despite the focused tests and otherwise targeted bug-fix scope. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
An inactive app keeps running, so a refocus never suspended the socket and its streams are still live. The wakeup comment no longer calls the inactive state brief, since a call can keep the app inactive for minutes. Co-authored-by: Nick <1109914+nick-potts@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Taking over this one as maintainer for batch ssh-relay-remote-10. I will preserve the contributor commits, merge current main, simplify the implementation and tests, and push follow-ups here. Slow-link and native verification limits will stay explicit; this remains unmerged pending human approval. |
…nnections # Conflicts: # packages/client-runtime/src/connection/supervisor.test.ts # packages/client-runtime/src/connection/supervisor.ts
Healthy slow connections can be dropped when a health check or cached T3 Connect ticket takes more than three seconds. The shared connection supervisor now gives quick probes six seconds and extends them when raw WebSocket messages still arrive, with an absolute fifteen-second cap. Cached ticket requests also get six seconds, including learned LAN and tailnet routes.
Frame counting runs before the RPC read loop, so a full subscription buffer cannot hide incoming traffic. The message listener belongs to the socket scope and is removed on release. Mobile returns from an inactive state without a background visit reset retries and check for a better route without probing or resubscribing shell/thread streams. Genuine background resumes retain their existing probe/reconnect behavior. Effect's five-second ping cadence, direct endpoint identity checks, and current main's token-preservation rules are unchanged.
Maintainer takeover of #19426, building on @t3dotgg's work and @nick-potts's original contribution in #18704. All contributor commits are preserved; current main was merged and follow-ups simplify the tests, socket ownership, and comments.
Verification on headless Linux, Node 24, at aa7bb7087e:
Tests: GPT-6-Astra (high); implementation: GPT-6.1-Sol (high); adversarial reviews: Claude Opus 5.5 and GPT-6-Sol through T3 Code delegated tasks. Coordinated with GPT-6.1-Sol through the Codex harness in T3 Code.