Repository navigation
feat(browser): add shared isolated CefRequestContext pool for previews and remote server partitions - #277
Merged
Conversation
…s and remote server partitions
Implements Phase 3a shared `CefRequestContext` isolation and remote proxy confinement
across `apps/browser-engine`, `crates/browser-pane`, and `apps/desktop` (unblocking
PREVIEWS Phase 2, WS-9 extension isolation, and BROWSER-TOOLS Phase 4 remote tunnels):
- **Shared context pool (`apps/browser-engine/src/context.rs`):** Adds `ContextKind`
(`Default` | `IsolatedPreview { grant }` | `RemoteServer { partition, proxy }`) on
`HostMsg::OpenTab` (additive `#[serde(default)]`), plus `HostMsg::SetPartitionProxy`,
`HostMsg::DropContext`, and `EngineMsg::Ready { partitions: true, remote_proxy: true }`.
- **In-memory storage/cookie/extension isolation:** `IsolatedPreview` and `RemoteServer`
contexts use empty `cache_path` + `persist_session_cookies: 0`, keeping cookies and
localStorage isolated from `Default` and from each other (and invisible to extensions).
- **Remote proxy & network confinement:** Validates proxy endpoints to loopback hosts
only (`browser.proxy.invalid` fail-closed), sets `proxy` preference to `fixed_servers`
with `bypass_list = "<-loopback>"` (so loopback resolves on the remote server through
the tunnel), `webrtc.ip_handling_policy = "disable_non_proxied_udp"`,
`dns_over_https.mode = "off"`, and `net.quic_allowed = false`, deferring first-tab URL
loads until `on_request_context_initialized` applies preferences (zero race window;
fails closed if preference application fails). Handles `is_proxy == 1` Basic auth
strictly for matching `(scheme, host, port, realm)` (`network.ts:57-66`), cancelling
all other proxy auth challenges. Strips `file_roots` on `RemoteServer` tabs.
- **App fail-closed gating (`crates/browser-pane`, `apps/desktop`):** Holds non-default
context tabs until `Ready`, refusing unsupported isolated/proxied contexts on older
engines (`browser.partitions.unsupported`); routes remote-server tabs to per-server
partitions and inherits opener `RemoteServer` context on pop-ups.
|
PR test build retired — merged into |
Hona
added a commit
that referenced
this pull request
Nov 20, 2026
…..UP-117 (#284) - Fold verified fleet PRs #259, #267, #268, #269, #270, #271, #272, #273, #275, #276, #277, #279, and #282 (Rune e6deb869: #1297, #1298, #1299, #1300) into docs/upstream-sync/ledger.{json,md} - Split UP-095 (#63002) transparently across active browser streams (WS-1, BROWSER-UI, PREVIEWS, BROWSER-TOOLS, WS-9), reassign UP-100 to BROWSER-UI and PRE-08 to BROWSER-TOOLS - Track open tab-groups packaged-default regression on UP-062 (fix PR #278 open) and record closure of Settings > Shortcuts hidden-command regression on UP-064 (#279) - Audit upstream anomalyco/opencode 92d35f8e18..bfee96a859 (+11 commits: 7 skipped, 4 added: UP-114..UP-117) and update radar routing
Hona
added a commit
that referenced
this pull request
Nov 20, 2026
…18..UP-122 (#295) - Fold verified fleet PRs #278, #285, #287, #288, #289, #290, #291, and #293 (Rune dc8f7f72: #1301, #1302 focus rescue verified Send+Enter -> effort) into docs/upstream-sync/ledger.{json,md} - Close UP-062 packaged-default regression (#278), UP-095-UI / UP-100 / UP-106 / UP-109 / UP-117 (#285, #289), and PRE-08 (#287); reassign UP-115, UP-116, UP-075 to BROWSER-UI - Add separate Reviewed column for browser rows tracking retrospective security reviews on merged PRs (#245, #268, #272, #277, #288, #275, #287, #285, #289) and pre-merge holds (#274, #280, #281, #283, #286, #292, #294, and BROWSER-TOOLS PR 3+) - Audit upstream anomalyco/opencode bfee96a859..2002222d13 (+6 commits: 1 skipped, 5 added: UP-118..UP-122) and refine radar routing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the shared isolated
CefRequestContextpool (apps/browser-engine/src/context.rs) and per-server partition / remote proxy confinement (Phase 3a ofUP-095#63002, unblocking PREVIEWS Phase 2, WS-9 extension isolation, and BROWSER-TOOLS Phase 4 remote tunnels):ContextKindcontract (wire.rs,protocol.rs): Additive#[serde(default)] context: ContextKind(Default|IsolatedPreview { grant }|RemoteServer { partition, proxy }) onHostMsg::OpenTab, plusHostMsg::SetPartitionProxy,HostMsg::DropContext, andReady { partitions: true, remote_proxy: true }.apps/browser-engine/src/context.rs):IsolatedPreviewandRemoteServertabs run in dedicated in-memoryCefRequestContexts (cache_path: "",persist_session_cookies: 0) isolated from the user's persistentDefaultprofile and from each other;RemoteServertabs always dropfile_roots.RemoteProxyConfigstrictly to loopback hosts (browser.proxy.invalidfail-closed), configures Chromium'sproxypreference (fixed_servers,bypass_list = "<-loopback>"),webrtc.ip_handling_policy = "disable_non_proxied_udp",dns_over_https.mode = "off", andnet.quic_allowed = false, defers initial navigation on newly created proxied contexts untilon_request_context_initializedfinishes applying preferences (failing closed on failure), and answersauth_credentials(is_proxy == 1)strictly when(basic, host, port, realm)matches (network.ts:57-66).crates/browser-pane,apps/desktop): Defers non-default tabs untilReady, refuses isolated/proxied opens on older engines lackingpartitions/remote_proxy(browser.partitions.unsupported), uses per-serverRemoteServerpartitions for non-sidecar servers, and inheritsRemoteServercontext on pop-ups.Verification
scripts/guardrails.ps1: 5/5 passed (0 files > 800 in desktop/features/crates, 0 dialog-size errors)cargo clippy -p browser-pane --no-deps -- -D warnings,cargo check -p browser-pane --no-default-features,cargo check --workspace,scripts/web.ps1 -Check, andapps/browser-enginebuild: all passed with 0 warningsReady { partitions: true, remote_proxy: true }, cookie/localStorage isolation acrossDefaultvsIsolatedPreviewvsRemoteServer("srv-a")vsRemoteServer("srv-b"), loopback127.0.0.1traffic routed 100% through authenticated local proxy (<-loopback>, 0 direct hits, 0 user auth prompts),RemoteServerfile://refusal, non-loopback proxy fail-closed refusal, and cleanDropContextteardown