Skip to content

feat(browser): apply client page reconciliation - #14763

Closed
Jinwoo-H wants to merge 1 commit into
sta-4150-browser-reconciliation-command-contractsfrom
sta-4150-browser-page-reconciliation-adapters
Closed

Jinwoo-H wants to merge 1 commit into
sta-4150-browser-reconciliation-command-contractsfrom
sta-4150-browser-page-reconciliation-adapters

Conversation

@Jinwoo-H

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

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​890 $\color{#cf222e}{\Huge{\mathbf{−}}}$​12 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​878
Prod 31 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1255 $\color{#cf222e}{\Huge{\mathbf{−}}}$​238 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1017

Summary

  • execute negotiated reclaimPage, restorePage, and closePage commands in the client-hosted Electron page executor
  • rekey one retained guest across renderer retention, prepared Session authority, WebContents lifecycle claims, and navigation authority without remounting
  • fail closed on uncertain rekey or cleanup, including both possible renderer identities and immutable outcomeUnknown inventory
  • keep reconciliation advertisement and all production client placement disabled

This draft is stacked on #14759 and is one production-inert stage of STA-4150.

Causal evidence

  • reverting dual-identity cleanup makes the adapter oracle fail because the previous retained renderer key survives
  • reverting failed-retirement inventory transfer leaves a rejected cleanup promise in the live-page map
  • reverting failed-close fence release bricks later same-generation commands
  • a fresh new-authority dispatcher successfully reclaims an old-authority executor page; same-dispatcher create-to-reclaim is intentionally not supported because reclaim requires an authority-epoch transition

Validation

  • changed surface: 19 files / 233 tests
  • paired runtime/server: 13 files / 179 tests
  • isolated real-Electron lifecycle: 1/1
  • cross-version terminal wire: 5/5
  • Node/CLI/web typecheck
  • full lint, native and type-aware audits, 87 reliability gates, max-lines, skill and localization checks
  • changed-code quality: zero findings
  • formatting and git diff --check

Compatibility and remaining blocker

No new remote field or opcode is introduced in this stage. Reconciliation remains behind the optional, already-negotiated subprotocol and is not advertised by production. Old clients, server/offscreen placement, browserless hosts, SSH/WSL routes, folder workspaces, git worktrees, and current browser behavior remain unchanged.

Do not enable production advertisement from this PR. Server orchestration still needs a dedicated authenticated action-issuance path, preservation of the client executor across authority transition, and proof-driven placement rekey after the client result. Restore remains behind the global phase-one barrier.

@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-page-reconciliation-adapters branch 2 times, most recently from f68f417 to e671b0a Compare August 15, 2026 12:30
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-page-reconciliation-adapters branch from e671b0a to f607a6b Compare August 16, 2026 09:09
@OrcaWin

OrcaWin commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Closing because this client reconciliation stage is retained in current origin/main (1a723194c32). I compared all production changes and the introduced regression intent.

The client dispatcher still distinguishes create/reclaim/restore bootstrap, snapshots nested prior authority, deduplicates exact commands and releases the terminal fence after failed close. The executor still reclaims the exact retained guest through prepared Session authority, WebContents lifecycle claim, renderer key and navigation grant without remounting; restore uses fresh creation then separate navigation. Uncertain rekey cleanup retires both possible renderer identities, and failed retirement transfers an immutable outcomeUnknown inventory entry out of the live map. Main additionally requires the same authority runtime before reclaim.

The prepared-page/session/WebContents rekey modules, renderer rekey and bridge protocol are byte-identical to this stage; the surrounding paths have later automation/profile and lifecycle extensions. The command-order, reconciliation adapter, prepared-page, retained-renderer, preload, Session and WebContents suites passed 114 tests across seven files. All introduced regression case intents remain represented, including abort during rekey, dual-identity failure cleanup and failed-close recovery.

This is supersession of the inert stage, without asserting the entire cross-platform browser activation matrix 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