Skip to content

feat(browser): fence client page placements - #14529

Draft
Jinwoo-H wants to merge 1 commit into
sta-4150-browser-page-owner-fencingfrom
sta-4150-browser-page-placement-fencing
Draft

feat(browser): fence client page placements#14529
Jinwoo-H wants to merge 1 commit into
sta-4150-browser-page-owner-fencingfrom
sta-4150-browser-page-placement-fencing

Conversation

@Jinwoo-H

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

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 +157 0 +157
Prod 3 +179 −36 +143

Summary

  • extract runtime-owned logical page placement into a bounded registry
  • require the exact runtime, authority epoch, browser-host generation, page-host generation, current client placement, and still-live host lease before client-page use
  • reject retired, replaced, server, invalid, and over-capacity placement claims without reusing page generations

This is the next inert STA-4150 lifecycle boundary. It adds no exchanged field, RPC/event, capability advertisement, Electron IPC, renderer surface, or production caller. Server placement remains the default and existing old-client/server behavior is unchanged.

Why

The preceding route/WebContents stages can fence an active or retiring tuple, but the future IPC/control adapter still needs runtime-owned lifetime authority after retirement settles. Before this change there was no atomic API that joined logical placement identity to the current live browser-host lease, page placements were unbounded, and page/host IDs were not validated at this boundary.

T3Code independently validates the broad split—server-owned logical tab state with a desktop-renderer-owned Electron webview—but its renderer mounts the target URL and later registers {tabId, webContentsId}. Orca intentionally keeps the stricter blank → main-derived exact registration → navigation-grant sequence because remote localhost, DNS, and private traffic must never escape through the desktop network.

Evidence

  • causal baseline: 5/5 new placement assertions failed on parent 5683c491dd because exact live authority, bounds, and identity validation did not exist
  • candidate: 17/17 focused placement/lease tests passed, including the real default 256 → 257 capacity boundary and recovery at generation 257
  • full main-runtime suite: 4,163 passed, 5 existing skips
  • full main-browser suite: 773 passed
  • full typecheck, type-aware/changed-code audits, reliability manifest, formatting, diff, and max-lines ratchet passed
  • fresh correctness, security/performance, and lifecycle reviews found no publication blocker

Compatibility and activation gates

  • no remote-wire or published-content change; docs/reference/remote-wire-compatibility.md remains satisfied without negotiation
  • no mobile-facing surface, persistence schema, dependency, package, filesystem/path, native, or platform-specific behavior changed
  • placement state is scoped to one runtime authority; bare page IDs never cross registries
  • released-lease placements intentionally remain visible but unusable until lifecycle reconciliation retires/replaces them, preventing silent server fallback

Activation remains blocked on capability-qualified host selection, authenticated capability-gated command delivery, main-owned renderer/page grants, displaced-page teardown and acknowledgement, request/worker/download/storage settlement, reconnect inventory, and real Electron/CDP plus headed/headless/browserless and physical cross-platform traffic proof.

Linear: STA-4150

@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-page-placement-fencing branch 2 times, most recently from 17ac3c7 to 6e8d6f5 Compare August 14, 2026 20:14
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-page-placement-fencing branch 3 times, most recently from b328172 to e085108 Compare August 15, 2026 00:44
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-page-placement-fencing branch from e085108 to facc602 Compare August 15, 2026 00:57
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-page-placement-fencing branch from facc602 to 0d3b7e6 Compare August 15, 2026 02:57
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-page-placement-fencing branch from 0d3b7e6 to dd242be Compare August 15, 2026 03:24
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-page-placement-fencing branch 2 times, most recently from 4059baa to bcf34b1 Compare August 15, 2026 10:24
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-page-placement-fencing branch from bcf34b1 to 339979f Compare August 15, 2026 11:34
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-page-placement-fencing branch from 339979f to ec3bed2 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