Repository navigation
Conversation
87df81c to
9f2b17d
Compare
e63dcde to
dacb536
Compare
716e0dd to
ffe4492
Compare
ffe4492 to
f11eafe
Compare
|
Closing because the tunnel foundation is already implemented on main ( I read the complete production patch, body and available discussion and compared the regression intent. The strict versioned tunnel codec is byte-identical, including frame identity/size/opcode checks, bounded UTF-8 DNS targets, control payload validation and exact window-credit encoding. Destination session generation fencing, stream-ID nonreuse, receive credit after write settlement, bounded pending data/chunks, ordered EOF/close and fail-closed transport admission all remain. Main has since extracted open admission, heartbeat and stream lifecycle and added pending-open/open-rate limits, aggregate retained-byte accounting and exact release of pending writes. One old behavior is deliberately superseded: late traffic for an already retired stream is ignored so concurrent streams survive, while never-reserved or reused stream identities still fence the tunnel. Current regressions cover that distinction. The main-owned loopback SOCKS5 CONNECT listener still preserves domain names until the execution-host connector, normalizes listener wildcards at that boundary, rejects other commands, bounds handshake/pipelined data, destroys late upstreams and closes deterministically. Its pending-input buffering and upstream backpressure have since been strengthened. Both capability names now live in the browser capability module; the old unadvertised-stage assertion has been superseded by the activated implementation. Validation: 5 focused current suites, 36 tests passed (wire protocol, destination session, stream-scoped failure, aggregate memory and SOCKS). Relevant files are unchanged in |
Summary
browser.clientHost.v1andnetwork.browserTunnel.v1without advertising either capabilityArchitecture decision
ELI5: the browser window will eventually live on the desktop client, but every network socket must still exit from the selected execution host. The runtime remains the owner of page identity, placement, generations, and agent/CLI routing. Existing pages and old clients stay on the server-hosted engine; live pages never silently migrate engines.
This draft is an intentionally inert Stage 1 foundation. The new capabilities are excluded from
RUNTIME_CAPABILITIES, so there is no RPC, binary subscription, webview, Electron partition, placement change, or mixed-version behavior change yet.Scope boundary
This does not duplicate or modify STA-4231 / #14402, which is Stage 0 server-hosted compatibility hardening. It also does not base on #10046: that draft overlaps future placement UI/defaults but does not provide execution-host networking, so desktop-local routing would break remote localhost and private DNS semantics.
Deterministic evidence
Red evidence was recorded before each production primitive existed: the protocol, session, and SOCKS tests failed with missing-module errors on the source checkout, then passed after implementation.
Post-rebase validation on
origin/main:pnpm exec vitest run --config config/vitest.config.ts src/shared/browser-network-capabilities.test.ts src/shared/browser-network-tunnel-protocol.test.ts src/main/browser/browser-network-tunnel-session.test.ts src/main/browser/remote-browser-socks-server.test.ts— 4 files, 25 tests passedpnpm run typecheck— passedpnpm run check:code-quality:changed— passed with zero new findingspnpm run check:reliability-gates— passedpnpm run check:max-lines-ratchet— passed with no new bypassesgit diff --check— passedAn exploratory full repository run completed 51,718 passing tests with six unrelated environment/resource failures. Isolated reruns passed the filesystem/process tests; the relay test passed after removing Orca-terminal-injected Git guard variables; the two deleted-CWD PTY tests passed with a 120-second timeout.
Compatibility and activation blockers
No exchanged field, opcode, capability, or publication semantic is active, so old desktop/mobile clients, current servers, SSH/WSL, folder workspaces, git worktrees, headed/headless hosts, and browserless hosts retain current behavior.
Before capability advertisement, later stages must add:
Linear: https://linear.app/stably/issue/STA-4150/refactor-remote-browser-to-client-hosted-electron-webviews