Skip to content

feat(browser): orchestrate page reconciliation - #14769

Closed
Jinwoo-H wants to merge 2 commits into
sta-4150-browser-page-reconciliation-adaptersfrom
sta-4150-browser-reconciliation-orchestration
Closed

Jinwoo-H wants to merge 2 commits into
sta-4150-browser-page-reconciliation-adaptersfrom
sta-4150-browser-reconciliation-orchestration

Conversation

@Jinwoo-H

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

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 7 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​613 $\color{#cf222e}{\Huge{\mathbf{−}}}$​6 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​607
Prod 10 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​723 $\color{#cf222e}{\Huge{\mathbf{−}}}$​73 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​650

Summary

  • consume each authenticated client-page inventory once and plan reconciliation against runtime-owned intent
  • issue reclaim, close, and restore through the exact negotiated command ledger, reserving target generations without exposing placement
  • commit client placement only after an exact completed result; preserve unknown-result replay, server/unrelated placement, and fail-closed reconnect semantics
  • release completed-close ledger capacity while retaining bounded exact result replay

Evidence

  • baseline: 5/5 orchestration assertions failed because the registry had no reconciliation entry point
  • review oracle: reconnect grace left the old attempt pending; candidate aborts it while preserving command replay
  • resource oracle: completed close exhausted active-page capacity; candidate releases the slot with exact replay retained
  • reservation oracle: retirement let another page steal a replacement slot; candidate transfers that slot atomically
  • focused: 5 files / 55 tests
  • affected: 17 files / 172 tests
  • paired runtime: 18 files / 183 tests
  • real paired RPC/E2EE integration: 3/3
  • mixed-version terminal wire: 5/5
  • isolated Electron lifecycle: 1/1
  • full Node/CLI/web typecheck, lint/native/type-aware audits, 87 reliability gates, max-lines, changed-code quality, formatting, and diff checks pass

Compatibility and rollout

This stage is production-inert: it adds no exchanged field, stream opcode, capability advertisement, placement publication, UI, or production caller. Old clients and explicit server/offscreen placement remain unchanged; SSH/WSL execution-host grants, folder workspaces, git worktrees, browserless hosts, and headed/headless behavior remain on their existing paths. Activation and live cross-platform topology proof remain later STA-4150 stages.

Linear: STA-4150

Stacked on #14763. Do not merge or mark ready yet.

@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-reconciliation-orchestration branch 4 times, most recently from 24341ac to e127b4a Compare August 15, 2026 22:58
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-page-reconciliation-adapters branch from e671b0a to f607a6b Compare August 16, 2026 09:09
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-reconciliation-orchestration branch from e127b4a to a2d6eec Compare August 16, 2026 09:09
@OrcaWin

OrcaWin commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Closing because main (1a723194c32) already contains this orchestration, reservation and result-capacity stage, with a safer adoption boundary.

I read the complete production patch, body and available discussion and compared its regression intent. The current orchestrator still consumes authenticated inventories once, permits one attempt per lease, validates exact runtime/host/device/grants, reserves target generations before exposing placement, commits only after exact completed command results, cancels reservations on failure, and aborts attempts on disconnect/release while leaving unknown commands available for replay. Restored inventory captured before an outstanding result remains quarantined.

The actions retain close-before-restore, exact placement identity checks and atomic replacement-slot transfer. Completed close results release active ledger capacity while bounded exact result replay remains, now in an extracted result cache. Failed closes can be retried from fresh inventory. Server or unrelated placements remain protected.

The old whole-inventory entry point has deliberately become scoped adoptClientPages: only pages named by runtime intents enter the plan. Main explicitly preserves unclaimed inventory because it may contain live pages adoption declined; authenticated inventory alone does not authorize closing those guests. Thus the old orphan-close behavior is superseded by the current ownership boundary, not a missing feature to restore. Workspace/profile metadata and retained grant ownership are also carried through current adoption.

Validation: 5 focused current suites, 49 tests passed (orchestration, executor/preconditions, placement reservations and ledger capacity). The preceding authority-transition run passed the real paired-runtime reconciliation integration. Relevant runtime modules are unchanged in HEAD..origin/main. No Electron lifecycle test was rerun.

@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