Repository navigation
fix(realtime): redial backoff resets on the node's first frame; wake on online/visible - #855
Merged
Merged
Conversation
…on online/visible A socket accepted then dropped before any frame reset the curve every time, so the tab redialled every ~0.5s. The reset now waits for the node's first frame. The page socket also cuts a local backoff short on `online` and a visible `visibilitychange` (LiveClient.wake()); a node-assigned drain slot is kept so deploy herds stay spread. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d bytes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
✅ Reviewed — nothing blocking0 actionable comment(s) · grounded on your code ⏱ 1m 34s wall clock · 🤖 developerz.ai — automated review, running on your model and your box. |
Contributor
There was a problem hiding this comment.
Review summary — 8 file(s), 0 finding(s).
Completed review [bot]: moves redial backoff reset to inbound frames and adds online/visible wakeups while preserving node-assigned drain delays; no concrete defects found in the supplied diff.
🤖 developerz.ai review — automated, running on your model and your box. What is this? · Reviewed by router/gpt-6.1-sol on box hv-dedicated-dev-marshall — 137.3k in / 477 out over 3 calls; cost unknown: no price on record for router/gpt-6.1-sol.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
LiveClientresets its redial attempt on the node's first frame instead of onopen. A proxy or overloaded node that accepts the upgrade and drops it before speaking no longer pins the tab at ~0.5 s redials.LiveClient.wake(): when a local backoff is armed, dial now.page-socket.tscalls it ononlineand a visiblevisibilitychange. A node-assigned drain slot (reconnectframe) is kept, so the deploy herd stays spread.Why
Found auditing tesote/marketing's realtime path for production readiness (laptop wake / flaky proxy cases).
Tests
client-wake.test.ts(new): open-then-drop keeps backing off (500→1000→2000→4000); wake dials at once and restarts the curve; wake keeps a drain slot; no-op connected/closed.client-reconnect.test.ts: the reset-the-curve case now has the node answer before the drop.bun test packages/realtime: 1579 pass, 0 fail.verify --only lint,typecheck,filesize,boundaries,errors,manifestgreen.🤖 Generated with Claude Code