|
2584 | 2584 | "capability-gated native and SSH execution-host adapters", |
2585 | 2585 | "main-owned loopback SOCKS5 route", |
2586 | 2586 | "runtime-owned browser-host lease and placement authority", |
| 2587 | + "exact live client-page placement admission", |
2587 | 2588 | "dedicated paired-runtime E2EE tunnel subscription" |
2588 | 2589 | ], |
2589 | 2590 | "platforms": ["macos", "linux", "windows"], |
|
2594 | 2595 | "motivatingLinks": [ |
2595 | 2596 | "https://linear.app/stably/issue/STA-4150/refactor-remote-browser-to-client-hosted-electron-webviews" |
2596 | 2597 | ], |
2597 | | - "invariant": "A client-hosted browser network route exists only for an exact live server-owned browser-host lease, authority epoch, host generation, paired identity, execution-host revision or SSH provider authority, and server-owned route generation. Non-native descriptors require explicit capability negotiation and an exact runtime-minted lease-bound execution-host grant. Host selection never chooses arbitrarily, stale cleanup cannot remove a replacement, destination names remain unresolved until the execution host, credit returns only after writes settle, and route loss never falls back to desktop DNS or sockets. A main-owned local listener remains stable across upstream transport loss, rejects CONNECT while offline, accepts only a strictly newer tunnel generation, ignores superseded callbacks, and never reuses a stream ID within one generation. Pending opens, admitted open rate, per-route application bytes, aggregate browser-host/process bytes, claims, and socket sources remain bounded with exact release on settlement and retirement. Queued transport drain yields after a bounded quantum. The local SOCKS endpoint accepts only loopback CONNECT and rejects unsupported commands.", |
2598 | | - "oracle": "Attach two browser hosts and require unqualified selection to fail ambiguous while exact selection succeeds. Reject a second identity on one connection and a fifth identity for one paired device, release one exact lease, then admit its replacement without starving another device. Saturate the browser-host long-poll sub-cap, require an ordinary wait to remain admitted, close the socket, and prove both counters and handlers release. Replace one same-device connection, require the old subscription and route to fence, then prove late old cleanup leaves the new generation live. Mint an exact execution-host grant, reject a different key, prove late old grant cleanup leaves its replacement, and invalidate every grant with lease replacement. Retire a closed page placement by exact token, reject delayed cleanup against a replacement and server placement, and require its reused ID to receive a higher global generation without retaining a tombstone. Admit 16 pending destination opens and reject the seventeenth until one connects; admit 128 opens in one monotonic 10-second window and reject the 129th until the window expires. Fill 8 MiB across destination-to-client queues and separately across unsettled client-to-destination writes, release one exact retired stream, admit one replacement, and require the next byte claim to close the route without stale-callback or reentrant-close underflow. Across multiple routes, charge application copies, encrypted queue entries, and dynamic native socket bytes to one 32 MiB browser-host and 128 MiB process ceiling; reject zero-byte claim/socket-source floods, fence released leases, synchronously release JavaScript queue claims while retaining native claims through exact socket close, and yield a parked queue after four frames without reordering. Drop an authenticated transport, require the same listener to reject CONNECT before and during reconnect, attach the exact existing native v1 payload and capability pair to a strictly newer generation, ignore late old callbacks, and roll an exhausted stream-ID ledger only by replacing the generation. Require SSH descriptors to add the execution-host capability and exact grant, reject missing grants and stale provider authority before resolver or binary registration, pass exact domains to ssh2 and system-SSH SOCKS without local resolution, sanitize connector diagnostics, and close every stream and standalone route process once on timeout, synchronous failure, or rotation. Drive the accepted lease through real paired E2EE native SOCKS-to-HTTP and ephemeral Docker ssh2 remote-only DNS journeys, then exercise exact frame, credit, half-close, stale-stream, remote-DNS, unsupported-command, offline, and teardown assertions.", |
| 2598 | + "invariant": "A client-hosted browser network route exists only for an exact live server-owned browser-host lease, authority epoch, host generation, paired identity, execution-host revision or SSH provider authority, and server-owned route generation. A client page is usable only when its runtime ID, authority epoch, host identity and generation, logical page ID, page-host generation, current placement, and still-live lease all match atomically; a retired or server-placed page cannot be claimed as client placement. Live logical placements and their identities are bounded, while the runtime-wide page generation stays monotonic without tombstones. Non-native descriptors require explicit capability negotiation and an exact runtime-minted lease-bound execution-host grant. Host selection never chooses arbitrarily, stale cleanup cannot remove a replacement, destination names remain unresolved until the execution host, credit returns only after writes settle, and route loss never falls back to desktop DNS or sockets. A main-owned local listener remains stable across upstream transport loss, rejects CONNECT while offline, accepts only a strictly newer tunnel generation, ignores superseded callbacks, and never reuses a stream ID within one generation. Pending opens, admitted open rate, per-route application bytes, aggregate browser-host/process bytes, claims, and socket sources remain bounded with exact release on settlement and retirement. Queued transport drain yields after a bounded quantum. The local SOCKS endpoint accepts only loopback CONNECT and rejects unsupported commands.", |
| 2599 | + "oracle": "Attach two browser hosts and require unqualified selection to fail ambiguous while exact selection succeeds. Reject a second identity on one connection and a fifth identity for one paired device, release one exact lease, then admit its replacement without starving another device. Saturate the browser-host long-poll sub-cap, require an ordinary wait to remain admitted, close the socket, and prove both counters and handlers release. Replace one same-device connection, require the old subscription and route to fence, then prove late old cleanup leaves the new generation live. Mint an exact execution-host grant, reject a different key, prove late old grant cleanup leaves its replacement, and invalidate every grant with lease replacement. Retire a closed page placement by exact token, reject delayed cleanup against a replacement and server placement, and require its reused ID to receive a higher global generation without retaining a tombstone. Require a client page through the exact runtime, epoch, host, and page tuple; reject every mismatch, released or replaced leases, retired pages, server placements, invalid identities, and the 257th live placement while allowing exact replacement at capacity. Admit 16 pending destination opens and reject the seventeenth until one connects; admit 128 opens in one monotonic 10-second window and reject the 129th until the window expires. Fill 8 MiB across destination-to-client queues and separately across unsettled client-to-destination writes, release one exact retired stream, admit one replacement, and require the next byte claim to close the route without stale-callback or reentrant-close underflow. Across multiple routes, charge application copies, encrypted queue entries, and dynamic native socket bytes to one 32 MiB browser-host and 128 MiB process ceiling; reject zero-byte claim/socket-source floods, fence released leases, synchronously release JavaScript queue claims while retaining native claims through exact socket close, and yield a parked queue after four frames without reordering. Drop an authenticated transport, require the same listener to reject CONNECT before and during reconnect, attach the exact existing native v1 payload and capability pair to a strictly newer generation, ignore late old callbacks, and roll an exhausted stream-ID ledger only by replacing the generation. Require SSH descriptors to add the execution-host capability and exact grant, reject missing grants and stale provider authority before resolver or binary registration, pass exact domains to ssh2 and system-SSH SOCKS without local resolution, sanitize connector diagnostics, and close every stream and standalone route process once on timeout, synchronous failure, or rotation. Drive the accepted lease through real paired E2EE native SOCKS-to-HTTP and ephemeral Docker ssh2 remote-only DNS journeys, then exercise exact frame, credit, half-close, stale-stream, remote-DNS, unsupported-command, offline, and teardown assertions.", |
2599 | 2600 | "commands": [ |
| 2601 | + "pnpm exec vitest run --config config/vitest.config.ts src/main/runtime/browser-host-page-placement.test.ts src/main/runtime/browser-host-lease-registry.test.ts", |
2600 | 2602 | "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", |
2601 | 2603 | "pnpm exec vitest run --config config/vitest.config.ts src/main/browser/browser-network-tunnel-client.test.ts src/main/browser/paired-runtime-browser-network-route.test.ts src/main/runtime/runtime-binary-message-router.test.ts src/main/runtime/rpc/methods/browser-network-tunnel.test.ts src/main/runtime/browser-network-tunnel-paired-runtime.integration.test.ts", |
2602 | 2604 | "pnpm exec vitest run --config config/vitest.config.ts src/main/browser/browser-network-tunnel-outbound-memory-budget.test.ts src/main/browser/browser-network-tunnel-client-memory-budget.test.ts src/main/browser/browser-network-tunnel-session-aggregate-memory.test.ts src/shared/ws-outbound-backpressure-queue.test.ts src/shared/remote-runtime-client.test.ts", |
|
2610 | 2612 | "src/shared/browser-network-capabilities.test.ts", |
2611 | 2613 | "src/shared/browser-client-host-protocol.test.ts", |
2612 | 2614 | "src/shared/browser-network-tunnel-protocol.test.ts", |
| 2615 | + "src/main/runtime/browser-host-page-placement.test.ts", |
2613 | 2616 | "src/main/runtime/browser-host-lease-registry.test.ts", |
2614 | 2617 | "src/main/runtime/runtime-rpc-browser-host-admission.test.ts", |
2615 | 2618 | "src/main/runtime/rpc/methods/browser-client-host.test.ts", |
|
2635 | 2638 | "tests/e2e/ssh-browser-network-execution-route.docker.unit.test.ts" |
2636 | 2639 | ], |
2637 | 2640 | "assertionRefs": [ |
| 2641 | + { |
| 2642 | + "file": "src/main/runtime/browser-host-page-placement.test.ts", |
| 2643 | + "assertions": [ |
| 2644 | + "client placement requires the exact runtime, epoch, host, and page generation on a live lease", |
| 2645 | + "lease release and replacement fence an otherwise matching client placement", |
| 2646 | + "retired, replaced, and server placements cannot be claimed as live client pages", |
| 2647 | + "live placement count and page/host identities are bounded before generation allocation" |
| 2648 | + ] |
| 2649 | + }, |
2638 | 2650 | { |
2639 | 2651 | "file": "src/main/runtime/browser-host-lease-registry.test.ts", |
2640 | 2652 | "assertions": [ |
|
2841 | 2853 | } |
2842 | 2854 | ], |
2843 | 2855 | "evidenceRuns": [ |
| 2856 | + { |
| 2857 | + "date": "2026-08-14", |
| 2858 | + "runner": "local", |
| 2859 | + "platform": "macos", |
| 2860 | + "command": "pnpm exec vitest run --config config/vitest.config.ts src/main/runtime/browser-host-page-placement.test.ts src/main/runtime/browser-host-lease-registry.test.ts", |
| 2861 | + "result": "passed", |
| 2862 | + "durationSeconds": 0.2, |
| 2863 | + "summary": "Two files passed 17 exact runtime/epoch/host/page authority, live-lease fencing, monotonic replacement, invalid-identity, default 256-placement capacity, and stale-cleanup tests." |
| 2864 | + }, |
2844 | 2865 | { |
2845 | 2866 | "date": "2026-08-14", |
2846 | 2867 | "runner": "local", |
|
0 commit comments