Skip to content

fix(browser): isolate late retired tunnel frames - #14694

Closed
Jinwoo-H wants to merge 1 commit into
sta-4150-browser-client-host-reconnect-gracefrom
sta-4150-browser-tunnel-retired-frame-isolation
Closed

Jinwoo-H wants to merge 1 commit into
sta-4150-browser-client-host-reconnect-gracefrom
sta-4150-browser-tunnel-retired-frame-isolation

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Aug 15, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​61 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​60
Prod 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​90 $\color{#cf222e}{\Huge{\mathbf{−}}}$​18 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​72

Summary

  • ignore valid in-flight non-Open frames only for stream IDs proven retired or permanently reserved in the current tunnel generation
  • keep never-allocated IDs, explicit Open reuse, malformed frames, and stale generations fail-closed
  • extract shared tunnel heartbeat handling to preserve the session module size budget

This is a production-inert activation-hardening stage for STA-4150, stacked on #14691. It changes no field, opcode, capability, payload, publication, placement, or limit.

Causal evidence

Baseline: after retiring stream 1 while stream 2 remained live, one in-flight Data frame for stream 1 destroyed the entire tunnel and stream 2. The byte-identical oracle was 2 failed / 26 passed before the fix and 28 / 28 after it; never-allocated IDs and reused Open frames still close the route.

Validation

  • 16 browser-network/control files / 198 tests
  • full Node, CLI, and web typecheck
  • full lint, native and type-aware audits, 87 reliability gates, max-lines, localization, and changed-code quality
  • formatting and git diff checks
  • 31-patch post-rebase range-diff unchanged on origin/main@3908978ba4

Compatibility and risk

New/new peers isolate the late retired frame. Mixed-version pairs remain safe but an older endpoint keeps the conservative whole-tunnel teardown until upgraded. The feature remains unadvertised and server-hosted behavior is unchanged.

@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-tunnel-retired-frame-isolation branch 2 times, most recently from 1ec734c to 315be57 Compare August 15, 2026 03:28
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-host-reconnect-grace branch from 9d76da4 to f06b6bb Compare August 15, 2026 08:53
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-tunnel-retired-frame-isolation branch from 315be57 to 9efd374 Compare August 15, 2026 08:53
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-host-reconnect-grace branch from f06b6bb to c7fa7d6 Compare August 15, 2026 10:24
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-tunnel-retired-frame-isolation branch 2 times, most recently from 4b52893 to ec6690b Compare August 15, 2026 11:34
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-host-reconnect-grace branch from c7fa7d6 to f341731 Compare August 15, 2026 11:34
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-tunnel-retired-frame-isolation branch from ec6690b to e9aa426 Compare August 15, 2026 12:30
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-host-reconnect-grace branch from 65a2ee2 to a172987 Compare August 16, 2026 09:09
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-tunnel-retired-frame-isolation branch from e9aa426 to 394787b Compare August 16, 2026 09:09
@OrcaWin

OrcaWin commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Closing because the complete retired-frame isolation change is already present on current main (a93e31a93395953b795e9f5098a6b93c8ee331af). The tunnel client ignores missing stream IDs below nextStreamId; the host session ignores missing IDs in openedStreamIds; never-allocated/never-reserved identities still close the route. Both sides call the extracted handleBrowserNetworkTunnelHeartbeat.

I reviewed all seven changed files here and checked the current regression cases: “ignores a retired stream frame but rejects a never-allocated stream ID,” “keeps concurrent streams alive when late data arrives for a retired stream,” and the never-reserved/reused-ID case are already in main, as are both reliability-gate assertions. This closes the redundant implementation PR; it does not claim that the broader client-hosted browser activation and live-topology blockers described in its progress document are complete.

@OrcaWin OrcaWin closed this Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants