Skip to content

feat(browser): compose paired client host runtime - #14613

Closed
Jinwoo-H wants to merge 1 commit into
sta-4150-browser-client-page-renderer-registryfrom
sta-4150-browser-client-host-composition
Closed

Jinwoo-H wants to merge 1 commit into
sta-4150-browser-client-page-renderer-registryfrom
sta-4150-browser-client-host-composition

Conversation

@Jinwoo-H

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

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​680 $\color{#cf222e}{\Huge{\mathbf{−}}}$​7 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​673
Prod 15 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​975 $\color{#cf222e}{\Huge{\mathbf{−}}}$​65 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​910

Summary

  • compose one paired browser client host per exact environment pairing revision
  • join the authenticated control transport, page command executor, current renderer, Session/WebContents registries, and reference-counted execution-host routes
  • serialize replacement and shutdown so control transport closes before page cleanup, then force-close every remaining route
  • retain fail-closed cleanup tombstones until late handler/page cleanup is proven complete, with observable deferred cleanup failures

This is the next production-inert STA-4150 stack layer on #14596. It does not advertise a browser-host capability, publish client placement, adopt a BrowserPane, or add a normal browser-creation caller.

Linear: STA-4150

Compatibility

  • no exchanged field, opcode, or existing wire semantic changes in this layer
  • old clients and all current callers remain server-hosted
  • native routes require the exact authority runtime; SSH keeps the existing runtime-minted lease-bound grant
  • folder workspaces, git worktrees, browserless hosts, headed/headless hosts, and mixed versions are unaffected because activation remains disabled
  • network loss and ambiguous cleanup fail closed; there is no desktop DNS/socket or silent server-placement fallback

Evidence

  • focused composition: 9 files / 118 tests
  • composition plus execution routes: 22 files / 271 tests
  • WebContents/renderer: 12 files / 201 tests, including isolated Electron 43.1.0
  • old/new terminal wire compatibility: 5/5 journeys
  • pnpm run typecheck
  • pnpm run lint (85 reliability gates, native/type-aware audits, max-lines and localization checks)
  • pnpm run check:code-quality:changed (zero findings)
  • pnpm run build:electron-vite
  • git diff --check

Fresh lifecycle, correctness, security, and resource reviews found no blocker. Review-driven fixes cover async pairing failures, close/create races, late non-cooperative settlement, permanent unresolved-cleanup fencing, and observable deferred cleanup errors.

Known costs / follow-ups

  • unresolved ambiguous cleanup intentionally consumes bounded capacity until authenticated reconciliation or process restart
  • command persistence/replay across reconnect, WSL, physical cross-platform evidence, and live activation remain unproven
  • inventory/reconciliation, placement publication, command routing, browser chrome, traffic containment proof, and kill-switched activation remain later stages

Do not merge or mark ready; this PR is intentionally staged for review.

@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-host-composition branch from ea30baa to 7f41342 Compare August 14, 2026 22:01
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-page-renderer-registry branch from 4b6674f to d79f937 Compare August 14, 2026 23:17
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-host-composition branch 4 times, most recently from e162ba6 to d4ac51d Compare August 15, 2026 02:57
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-page-renderer-registry branch 2 times, most recently from a475b30 to 9660d8b Compare August 15, 2026 03:24
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-host-composition branch from d4ac51d to 713104f Compare August 15, 2026 03:24
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-page-renderer-registry branch from 9660d8b to e7b05e3 Compare August 15, 2026 08:53
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-host-composition branch from 713104f to e87ccd6 Compare August 15, 2026 08:53
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-page-renderer-registry branch from e7b05e3 to 9a92b3b Compare August 15, 2026 10:24
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-host-composition branch 2 times, most recently from 49c4384 to b8e9a03 Compare August 15, 2026 11:34
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-page-renderer-registry branch 2 times, most recently from bbc17c3 to cad7b90 Compare August 15, 2026 12:30
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-host-composition branch from b8e9a03 to 6dd3ef8 Compare August 15, 2026 12:30
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-host-composition branch from 6dd3ef8 to f3d7a91 Compare August 16, 2026 09:09
@OrcaWin

OrcaWin commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Closing this composition stage because its lifecycle contract is retained on current origin/main (1a723194c32), with later reconnect/reconciliation and activation built on it.

I compared the complete production changes and introduced regression intent. The environment registry still serializes operations, shares the exact pairing revision, retires replaced pairings and retains cleanup tombstones until whenClosed proves deferred cleanup. A newer same-pairing authority-transition path preserves the executor rather than tearing it down. Composition teardown remains control transport → settled executor cleanup → all route sets, deferring page cleanup behind non-cooperative handlers and reporting deferred failures. The dispatcher still exposes exact eventual handler settlement, and failed page cleanup remains bounded outcome-unknown inventory.

Reference-counted route admission still validates native authority (now WSL too), loopback endpoints and cancellation, including immediate abort during startup and late route close. Profile/session startup, lazy renderer IPC, app quit and environment invalidation are still wired after their module extractions. The two renamed route tests broaden the original native-authority and aborted-startup cases.

Eight current composition/registry/runtime/route/renderer/startup/client suites passed 78 tests. This closes the superseded foundation, without claiming all cross-platform/browser activation evidence is 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