Skip to content

feat(browser): report client page inventory - #14648

Closed
Jinwoo-H wants to merge 1 commit into
sta-4150-browser-client-page-reconciliationfrom
sta-4150-browser-client-page-inventory
Closed

Jinwoo-H wants to merge 1 commit into
sta-4150-browser-client-page-reconciliationfrom
sta-4150-browser-client-page-inventory

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{+}}}$​810 $\color{#cf222e}{\Huge{\mathbf{−}}}$​39 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​771
Prod 21 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​683 $\color{#cf222e}{\Huge{\mathbf{−}}}$​143 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​540

Summary

  • Add an optional, complete hosted-page inventory to the existing authenticated browser-host attach.
  • Negotiate inventory v1 independently from page commands, with atomic 256-page / 768 KiB bounds and exact paired-device restart provenance.
  • Snapshot executor lifecycle states conservatively: only an exact current guest is active; in-flight, retiring, stale, destroyed, and ambiguous pages are outcomeUnknown.

This is a production-inert STA-4150 stage. It does not advertise client hosting, activate client placement, execute reconciliation, or change server/offscreen browser behavior.

Compatibility

  • Old hosts and clients strip the optional fields.
  • Missing inventory/version remains unsupported/unknown; an authenticated empty array is distinct.
  • Unencodable optional inventory omits both fields while legacy page-command execution remains unchanged.
  • Previous-runtime IDs are retained only as evidence for the separately pinned, paired-device-bound restart reconciliation plan.

Validation

  • 11 focused files / 145 tests
  • 16 authenticated lease/tunnel files / 188 tests
  • Cross-version terminal wire: 5/5
  • Full Node/CLI/web typecheck and lint/audits
  • CLI, Electron, and paired-web builds
  • Two fresh read-only lifecycle/security/wire reviews: no P0/P1 or must-fix finding

Next stage

Preserve or transfer executor/page lifetime through reconnect grace, then feed the authenticated snapshot and runtime intent into the existing reconciliation planner. Missing inventory must never be treated as empty.

Linear: STA-4150

@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-page-inventory branch 2 times, most recently from 5f9c24b to 3a6ec15 Compare August 15, 2026 02:57
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-page-reconciliation branch from 0e9143e to f4f58e1 Compare August 15, 2026 03:24
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-page-inventory branch from 3a6ec15 to 52eca6a Compare August 15, 2026 03:24
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-page-reconciliation branch from f4f58e1 to 509bb26 Compare August 15, 2026 08:53
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-page-inventory branch from 52eca6a to 0b85a2b Compare August 15, 2026 08:53
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-page-reconciliation branch from 509bb26 to ad8c20f Compare August 15, 2026 10:24
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-page-inventory branch 2 times, most recently from 68699f8 to 92d11cc Compare August 15, 2026 11:34
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-page-reconciliation branch 2 times, most recently from 634bda5 to cdcb3ec Compare August 15, 2026 12:30
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-page-inventory branch from 92d11cc to a35d50b Compare August 15, 2026 12:30
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-client-page-inventory branch from a35d50b to a4b8825 Compare August 16, 2026 09:09
@OrcaWin

OrcaWin commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Closing because this complete page-inventory stage is already implemented on main (1a723194c32), including the authenticated wire contract and conservative lifecycle snapshot, after the browser-runtime modules were extracted.

I read the complete production patch, body and available discussion, compared its regression intent, and traced the current attach request, lease admission/storage, executor inventory and reconciliation planner. Main retains independent inventory-v1 negotiation, atomic 256-page / 768 KiB bounds, per-identity JSON byte bounds, duplicate/foreign-client rejection before lease replacement, immutable snapshots, optional-URL compaction without dropping identities, and legacy command behavior when optional inventory cannot encode. Missing inventory remains unsupported/unknown, distinct from authenticated empty inventory; unsolicited ready echoes are rejected.

The executor still reports creating, retiring, stale or unresolved guests as outcomeUnknown, with exact current renderer and guest-lifecycle claims required for active. Main further prevents an unknown page from becoming active again merely because a later snapshot sees current authority. Paired-device provenance remains required for reclaim, and main now restricts that reclaim to the same runtime; restart record adoption/recovery is handled separately. This supersedes the old inventory stage without claiming that cross-runtime reclaim is safe.

Validation: 10 focused current suites, 179 tests passed (protocol, executor/integration, inventory, host/composition/lease, registry, reconciliation planner and authenticated RPC). No Electron app or live paired-device run was performed. Relevant HEAD..origin/main changes do not alter these inventory contracts.

@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