Skip to content

feat(browser): bound host admission - #14493

Draft
Jinwoo-H wants to merge 1 commit into
sta-4150-browser-host-leasesfrom
sta-4150-browser-host-admission
Draft

feat(browser): bound host admission#14493
Jinwoo-H wants to merge 1 commit into
sta-4150-browser-host-leasesfrom
sta-4150-browser-host-admission

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Aug 14, 2026

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​243 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​243
Prod 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​89 $\color{#cf222e}{\Huge{\mathbf{−}}}$​18 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​71

Summary

  • cap one browser-host identity per authenticated connection and four per paired device, with exact release restoring capacity
  • meter permanent browser-host subscriptions under a dedicated 25% long-poll sub-cap so terminal/orchestration waits retain capacity
  • replace per-page generation tombstones with one global monotonic generation
  • make placement retirement token-safe so delayed cleanup cannot delete a newer client generation or server placement

This is the fourth inert layer for STA-4150, stacked on #14484. Production RPC registration and capability advertisement remain disabled.

Causal evidence

On the parent branch, one unchanged oracle failed three ways: a second identity on one connection was admitted, a fifth identity for one paired device was admitted, and closed page placement had no retirement API. Those cases are now bounded and exact.

Fresh review then found two additional lifecycle failures before publication: delayed cleanup could erase a replacement placement, and four devices could occupy all 16 shared long-poll slots. Retirement now requires the exact placement object, and a real injected WebSocket test proves host saturation still admits an ordinary wait and socket close aborts/releases both classes.

Validation

  • 11 focused files / 67 tests
  • 15 unique tunnel/lease/runtime files / 92 tests
  • full runtime RPC suite / 90 tests
  • cross-version terminal wire / 5 tests
  • pnpm typecheck
  • native and type-aware code-quality audits
  • reliability-gate manifest and max-lines ratchet
  • fresh correctness rereview: no remaining findings

Deliberately deferred before activation

  • pending tunnel-open/rate admission and aggregate route/host/process byte ledgers
  • wiring token-safe placement retirement into the future production page lifecycle
  • drain-aware stream fairness and SOCKS local-process trust decision
  • SSH/WSL/Linux/physical-Windows and old/new-peer journeys
  • Electron partition proxy/no-fallback proof and UI activation

@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-host-admission branch from 392d13b to 0ee9f17 Compare August 14, 2026 08:48
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-host-admission branch 2 times, most recently from 663c5b2 to 3e6d13b Compare August 14, 2026 10:18
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-host-admission branch from 3e6d13b to 7c6461b Compare August 14, 2026 20:02
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-host-admission branch from 7c6461b to 71fbd53 Compare August 14, 2026 20:14
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-host-admission branch from 71fbd53 to 0f85ac8 Compare August 14, 2026 21:00
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-host-admission branch from 0f85ac8 to 2a4d17a Compare August 14, 2026 23:17
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-host-admission branch from 2a4d17a to db76b08 Compare August 15, 2026 00:44
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-host-admission branch from db76b08 to 93ef582 Compare August 15, 2026 00:57
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-host-admission branch 2 times, most recently from c62b8ab to 6c2d4d0 Compare August 15, 2026 03:24
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-host-admission branch from 6c2d4d0 to 4acfe57 Compare August 15, 2026 08:53
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-host-admission branch from 4acfe57 to eea72e1 Compare August 15, 2026 10:24
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-host-admission branch 2 times, most recently from 46f19d3 to e8da24a Compare August 15, 2026 12:30
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.

1 participant