Skip to content

feat(browser): qualify client page host capabilities - #14531

Closed
Jinwoo-H wants to merge 1 commit into
sta-4150-browser-page-placement-fencingfrom
sta-4150-browser-capability-placement
Closed

Jinwoo-H wants to merge 1 commit into
sta-4150-browser-page-placement-fencingfrom
sta-4150-browser-capability-placement

Conversation

@Jinwoo-H

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

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​90 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​90
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​60 $\color{#cf222e}{\Huge{\mathbf{−}}}$​17 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​43

ELI5

Before the runtime assigns a browser page to a desktop, it now checks that the desktop actually promises every browser-engine feature that page needs. Previously the lease stored those promises but placement ignored them, so an incompatible host could be selected.

What Changed

  • Filter automatic host selection by every requested host capability.
  • Fail closed when an explicitly requested host lacks a requirement.
  • Require webview support for every client-hosted page before allocating its page generation.
  • Preserve explicit ambiguity when multiple eligible hosts exist; never route arbitrarily.
  • Prove reconnect capability downgrade fences the old page and does not silently replace it.

Why

STA-4150 requires runtime-owned, explicit browser placement. Capability-qualified selection is the next inert authority boundary before authenticated page-command delivery: a runtime must never place a page on a host that cannot implement it, and must never fall back to server placement implicitly.

This remains scaffolding only. It does not advertise a runtime capability, register an RPC or event, change an exchanged field, add an Electron/renderer caller, or enable client placement. Existing server-hosted behavior and old clients are unchanged.

Linked Issue

STA-4150

Visual Proof

N/A — no rendered UI or production behavior is activated.

Testing

  • Parent behavior: 3/3 new causal assertions failed because capability requirements were ignored.

  • Focused candidate: 22/22 placement, lease, and downgrade tests passed.

  • Full src/main/runtime + src/main/browser: 4,941 passed, 5 existing skips.

  • Adjacent RPC/protocol/mixed-version wire: 31/31 passed.

  • Full typecheck, native/type-aware audits, changed-code audit, formatting, reliability manifest, max-lines ratchet, and diff checks passed.

  • Two fresh correctness and security/performance reviews found no publication blocker.

  • I manually validated the deterministic runtime behavior locally

  • Automated tests added

Review

Please review capability matching, ambiguity, downgrade fencing, mixed-version/server-placement neutrality, and the intentionally inactive production surface.

Checklist

  • This PR is small and focused
  • I explained what changed and why, including ELI5
  • Visual proof is N/A because no UI path is active
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, mobile, and backward-compatibility impact considered
  • Relevant local tests, typecheck, audits, and quality gates pass; package builds are covered by CI

@Jinwoo-H Jinwoo-H changed the title sta 4150 browser capability placement feat(browser): qualify client page host capabilities Aug 14, 2026
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-capability-placement branch 2 times, most recently from c6f0bca to b7bb8bc Compare August 14, 2026 20:14
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-capability-placement branch from b7bb8bc to 88a455b Compare August 14, 2026 21:01
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-capability-placement branch from 88a455b to 56cc582 Compare August 14, 2026 23:17
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-capability-placement branch from 56cc582 to b651404 Compare August 15, 2026 00:44
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-capability-placement branch 2 times, most recently from 5ff5999 to 4058c8e Compare August 15, 2026 02:57
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-capability-placement branch 2 times, most recently from 2e3db76 to f9477f8 Compare August 15, 2026 08:53
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-capability-placement branch 2 times, most recently from 41d5c65 to e347789 Compare August 15, 2026 11:34
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-capability-placement branch from e347789 to dc906c4 Compare August 15, 2026 12:30
@Jinwoo-H
Jinwoo-H force-pushed the sta-4150-browser-capability-placement branch from dc906c4 to df7a72f Compare August 16, 2026 09:09
@OrcaWin

OrcaWin commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Closing because this stage is already implemented on current main (a93e31a93395953b795e9f5098a6b93c8ee331af) under src/main/runtime/browser-host/.

browser-host-capability-selection.ts contains the same capability matcher, exact-host rejection and ambiguity handling. browser-host-client-page-placement.ts requires webview plus the page requirements before allocating a placement, and the registry delegates to that selection (now restricted to active leases). The capability regression suite remains, including exact mismatch, no-webview, ambiguity and reconnect downgrade coverage.

I reviewed the complete patch and discussion against the current implementation and tests. This is a redundant stage closure, not a claim that every broader STA-4150 activation or live-topology requirement 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