Free, open-source screen sharing for private live streams with friends. Watch together in a browser or self-host Piik. 免费开源的私密屏幕共享,支持游戏直播、一起看电影与自部署。
docs(deploy): record Browser v10 postflight (#226)
AAA6c37395f9d85
diff --git a/docs/README.md b/docs/README.mdindex f01cc446..c724e171 100644--- a/docs/README.md+++ b/docs/README.md@@ -4,28 +4,28 @@- [方案设计](./方案设计.md): accepted implementation design; unfinished release and validation work is tracked in the current TODO ledger.- [Project memory](./project-memory.md): durable current product and source snapshot to read at the start of future work.- [Current status](./status.md): bounded current/index snapshot of production, active milestones, decisions, blockers, and links to detail.-- [Verification status](./verification-status.md): exact integrated/deployed v9 gates, current production evidence, open physical proof boundaries, and expensive-test applicability.+- [Verification status](./verification-status.md): exact integrated/deployed v10 gates, current production evidence, open physical proof boundaries, and expensive-test applicability.- [Session handoff](./session-handoff.md): temporary bootstrap prompt that points a new session back to the canonical truth owners.- [Current TODO](./todo.md): unresolved work, active truth holds, and decisions that still require user confirmation.-- [Deployment](./deployment.md): exact current v9 production and rollback configuration, release operations, and transport evidence boundaries.+- [Deployment](./deployment.md): exact current v10 production and rollback configuration, release operations, and transport evidence boundaries.- [Maintenance guide](./maintenance.md): Git workflow, context hygiene, document lifecycle, research policy, and automation.- [P2P WebRTC research](./research/webrtc-p2p-screen-sharing.md): evidence, bandwidth model, browser constraints, reference implementations, and feasibility assessment.-- [Peer-assisted media research](./research/peer-assisted-media.md): browser shared-encode limits, standard relay re-encoding, deterministic sticky topology, v9 exact-route implementation evidence, and remaining physical gates.-- [Low-server-cost media routes](./research/low-server-media-routes.md): Host-publication/SFU distribution, v9 route diagnostics, direct-to-SFU conclusion, hop-level accounting, privacy-safe ICE evidence, and bounded transport gates.+- [Peer-assisted media research](./research/peer-assisted-media.md): browser shared-encode limits, standard relay re-encoding, deterministic sticky topology, exact-route implementation evidence, and remaining physical gates.+- [Low-server-cost media routes](./research/low-server-media-routes.md): Host-publication/SFU distribution, route diagnostics, direct-to-SFU conclusion, hop-level accounting, privacy-safe ICE evidence, and bounded transport gates.- [Built-in peer ICE TURN candidate](./research/built-in-peer-ice-turn.md): historical evidence for the rejected participant-wide and selected-edge TURN candidates.- [Advanced peer distribution](./research/advanced-peer-distribution.md): generic local-reconcile evidence plus multi-tree/SVC, encoded-object relay, native RTP forwarding, FEC/network-coding, and MoQ gates.- [Native shared-encode sender](./research/native-shared-encode-sender.md): consolidated Draft #16/#18/#22/#23/#25/#28 ladder, unclassified product-gate failure, staged revalidation, and stop line.- [Native H.264 hardware decision](./research/native-h264-hardware-decision.md): bounded WebCodecs no-go, proved Media Foundation/NVIDIA hardware encode, the default-fmtp `42c01f` stop, and the retained interop boundary.- [Native H.264 opt-in path](./research/native-h264-opt-in-path.md): explicit H.264 sender mode, exact Pion profile registration, and one bounded Host/Viewer loopback with hardware caveats.-- [Realtime quality adaptation](./research/realtime-quality-adaptation.md): current v9 manual profile/codec boundaries, diagnostic-only capture/send/receive correlation, path-isolated dual representations, and bounded simulcast/Dynacast/SVC checks.+- [Realtime quality adaptation](./research/realtime-quality-adaptation.md): current v10 manual profile/codec boundaries, diagnostic-only capture/send/receive correlation, path-isolated dual representations, and bounded simulcast/Dynacast/SVC checks.- [Browser background capture diagnostics](./research/browser-background-capture.md): browser lifecycle evidence, a privacy-bounded capture/send/receive experiment, interpretation gates, and non-goal keepalive mechanisms.-- [Browser screen-audio quality](./research/browser-screen-audio-quality.md): capture/source compatibility, v9 live sender-ceiling readback, Opus negotiation boundaries, and remaining audible/device evidence.+- [Browser screen-audio quality](./research/browser-screen-audio-quality.md): capture/source compatibility, v10 live sender-ceiling readback, Opus negotiation boundaries, and remaining audible/device evidence.- [Display name and presence boundaries](./research/display-name-presence.md): browser-local storage failure behavior, Unicode normalization, control-character policy, and the Web-only presence capability boundary.- [Agent context governance research](./research/agent-context-governance.md): official Codex, Claude Code, Hermes Agent, and GitHub practices adopted by this repository.- [ADR-0001](./adr/0001-p2p-first-media-topology.md): historical P2P-first baseline; later access and automatic-routing decisions supersede its stale current-state details.- [ADR-0002](./adr/0002-memory-resident-protected-rooms.md): four-digit leased in-memory rooms, local Host defaults, scoped Viewer grants, and orthogonal code entry.- [ADR-0004](./adr/0004-peer-assisted-media-experiment.md): historical standard-WebRTC peer-assisted experiment and reusable evidence.-- [ADR-0005](./adr/0005-automatic-hybrid-media-routing.md): accepted and deployed v9 P2P-first single-reconcile route model; remaining real-network validation is tracked in verification status.+- [ADR-0005](./adr/0005-automatic-hybrid-media-routing.md): accepted and deployed v10 P2P-first single-reconcile route model; remaining real-network validation is tracked in verification status.- [ADR-0006](./adr/0006-fixed-high-native-sender-canary.md): proposed fixed-`HIGH` native canary, current no-go result, and staged revalidation boundary.- [ADR-0007](./adr/0007-demand-driven-dual-representation-quality.md): accepted path-isolated `HIGH + at most one LOW` policy, optional idle-layer stop, evidence contract, and SVC boundary.- [ADR-0008](./adr/0008-window-scoped-audio-capture.md): browser window-audio hint and the Windows WASAPI process-loopback boundary.diff --git a/docs/adr/0001-p2p-first-media-topology.md b/docs/adr/0001-p2p-first-media-topology.mdindex cfac541e..b690ae29 100644--- a/docs/adr/0001-p2p-first-media-topology.md+++ b/docs/adr/0001-p2p-first-media-topology.md@@ -31,7 +31,7 @@ contradict the private-room cost model or duplicate mature WebRTC capabilities.## Current Ownership[ADR-0005](./0005-automatic-hybrid-media-routing.md) owns current routing-invariants and assisted-route roles; the Browser `screener-v9` runtime is+invariants and assisted-route roles; the Browser `screener-v10` runtime isimplemented and deployed, while real-network validation remains open. [ADR-0004](./0004-peer-assisted-media-experiment.md)owns only historical peer-assisted evidence. Access and room lifetime are ownedby [ADR-0002](./0002-memory-resident-protected-rooms.md).diff --git a/docs/adr/0002-memory-resident-protected-rooms.md b/docs/adr/0002-memory-resident-protected-rooms.mdindex 5dbcb4d6..53e3e5fe 100644--- a/docs/adr/0002-memory-resident-protected-rooms.md+++ b/docs/adr/0002-memory-resident-protected-rooms.md@@ -1,6 +1,6 @@# ADR-0002: Memory-Resident Rooms And Scoped Viewer Access-- Status: Accepted; implemented and deployed in exact release `39fcf93`+- Status: Accepted; implemented and deployed in exact release `2726edd`- Date: 2026-08-23## Context@@ -101,7 +101,7 @@ all code-only Viewer attempts. A valid room grant may bypass that site gate onlyfor the exact Viewer role and room. Neither a code, room password, nor Viewergrant can create a room or become Host authority.-The current `screener-v9` room-entry boundary uses exactly one+The current `screener-v10` room-entry boundary uses exactly one`ROOM_ACCESS_DENIED` result. It applies only after site access to a well-formedcode-only Viewer attempt whose expected admission rejects an unknown or expiredroom, disabled code entry, an absent or incorrect room password, a full room, or@@ -151,7 +151,7 @@ the generic `SERVER_ERROR`. None of those paths is folded intostorage does not. No fingerprint or server user record participates.- Raw site passwords, Host tokens, Viewer grants, and room passwords remain outof application/proxy logs and server durable storage.-- On `screener-v9`, every expected denial of a well-formed, site-authorized+- On `screener-v10`, every expected denial of a well-formed, site-authorizedcode-only attempt yields only `ROOM_ACCESS_DENIED` with the same publicmessage and connection-close behavior. Tests cover unknown/expired rooms,disabled entry, absent/wrong passwords, full and bounded admission, while@@ -160,13 +160,12 @@ the generic `SERVER_ERROR`. None of those paths is folded into## Implementation Status-Production exact `39fcf93bae057fcbb1002702c3be6b90bac9027f`, release `39fcf93`,-runs the single `screener-v9` wire and implements this complete room boundary,+Current source and production run the single `screener-v10` wire and implement+this complete room boundary,including allocation, leases, orthogonal grant/code admission, rotate/revoke,password policy, local profile replay, restart loss, browser storage privacy,and the neutral `ROOM_ACCESS_DENIED` result. All expected code-only denials usethat same public result followed by the shared authentication-failed close code.-The atomic deployment postflight passed. Its rollback boundary is-`/opt/screener/backups/39fcf93-pre-v9-20260824T004257Z`; exact operational-evidence remains owned by deployment and verification status.+Exact release and operational evidence remain owned by deployment and+verification status.diff --git a/docs/adr/0005-automatic-hybrid-media-routing.md b/docs/adr/0005-automatic-hybrid-media-routing.mdindex cdf9b2a8..9b9b1878 100644--- a/docs/adr/0005-automatic-hybrid-media-routing.md+++ b/docs/adr/0005-automatic-hybrid-media-routing.md@@ -1,6 +1,6 @@# ADR-0005: Automatic Hybrid Media Routing-- Status: Accepted; v9 route and diagnostic contract deployed in exact release `39fcf93`+- Status: Accepted; deployed in exact release `2726edd`- Date: 2026-08-20- Last updated: 2026-08-24@@ -152,7 +152,7 @@ A `prepare` route update names that operation's exact child, route kind, andserver-issued candidate connection identity. Parent and child thereforeprepare the same connection; neither endpoint infers candidate authority froman assignment-list difference.-The accepted next Browser runtime contract uses the single `screener-v10` wire. On each WebSocket, the+The current Browser runtime contract uses the single `screener-v10` wire. On each WebSocket, theserver sends the exact prepare before its SFU configuration; the candidate childis queued before a peer parent is allowed to start its offer. WebSocket orderingis the companion-delivery contract, so clients keep no reordering inbox.@@ -282,7 +282,7 @@ candidate, retry hint, or other topology data. Access, Host presence, signaling,media, and autoplay remain independent presentation inputs.The room-serial operation does not divide its per-child deadline by Viewer-count, but simultaneous joins may form a linear queue. The current v9 diagnostic+count, but simultaneous joins may form a linear queue. The current v10 diagnosticsurface observes existing route events without changing the controller: foreach current child it keeps only the latest route-demand, operation-start,current-candidate-start, first-decoded-frame, and final-outcome timing. A new@@ -352,16 +352,12 @@ deployment-wide.## Current Deployment Boundary-Production exact `39fcf93bae057fcbb1002702c3be6b90bac9027f`, release `39fcf93`,-runs the single `screener-v9` Browser runtime with direct/STUN peer and LiveKit-SFU/UDP routes, including the route, first-frame, typed-status, and Host-only-diagnostic contract described above. The atomic deployment postflight passed;-its rollback boundary is `/opt/screener/backups/39fcf93-pre-v9-20260824T004257Z`.-Exact configuration and operational evidence are owned by the deployment-document; real heterogeneous-network and SFU media validation remains open. In-the accepted next contract this route model is unchanged, the operation owner is-only `route`, and the boundary ships only with the next atomic `screener-v10`-release; production has not crossed it.+Current source and production run the single `screener-v10` Browser runtime with+direct/STUN peer and LiveKit SFU/UDP routes, including the route, first-frame,+typed-status, and Host-only diagnostic contract described above. The operation+owner is only `route`. Exact release and operational evidence are owned by the+deployment document; real heterogeneous-network and SFU media validation+remains open.## Acceptance Boundarydiff --git a/docs/deployment.md b/docs/deployment.mdindex 5632bd3f..f61cab70 100644--- a/docs/deployment.md+++ b/docs/deployment.md@@ -3,8 +3,8 @@Last verified against upstream documentation: 2026-08-24.This page records the production deployment of exact integrated main-`39fcf93bae057fcbb1002702c3be6b90bac9027f`, release `39fcf93`, and the single-Browser `screener-v9` contract. Product direction and pending work are owned by+`2726edde9b87f31fd76e749de47972ef817a9bd5`, release `2726edd`, and the single+Browser `screener-v10` contract. Product direction and pending work are owned by[project memory](./project-memory.md) and [the TODO ledger](./todo.md).This section documents the repository's UDP-only deployment candidate: one@@ -22,26 +22,26 @@ ICE/UDP only. Ordinary peer ICE remains STUN-only and production coturn uses thetracked STUN-only configuration with TCP/TLS disabled. The source and productionconfigure no TURN, ICE/TCP, media TCP, or TLS-relayed media.-Production runs exact `39fcf93bae057fcbb1002702c3be6b90bac9027f`, release-`39fcf93`, from `/opt/screener/releases/39fcf93`. The immutable runtime ZIP+Production runs exact `2726edde9b87f31fd76e749de47972ef817a9bd5`, release+`2726edd`, from `/opt/screener/releases/2726edd`. The immutable runtime ZIPSHA-256 is-`28190c3a69ec937d39ab5d49fdbc8db6a07e6013c2ddd5f5590bf8249bf6bce6`.-Its 40-file path/size/hash manifest SHA-256 is-`0a8bb7bb4c880e80358492a8bdef5d8897bd453b7957861708655e75f717c2bf`.-The verified pre-v9 rollback boundary is-`/opt/screener/backups/39fcf93-pre-v9-20260824T004257Z`; its internal+`07fa6500300bfedc9cedccb0db761b70a9ada8dd77608153728e34835f4e1b78`.+Its 38-file path/size/hash manifest SHA-256 is+`c4ed6321fa3ac8b4c766a7e575d26f8fd4ec2ea929a9addefb7944abafa5b663`.+The verified pre-v10 rollback boundary is+`/opt/screener/backups/2726edd-pre-v10-20260824T025357Z`; its internal`SHA256SUMS` hash is-`1f741f29022f5eb1eb311a24f87f5f48598dca7b1879b88f9033c331fa06bd37`.+`62d19aa0a3ec400477a4c76121eb0e9e4d553d024404f3da054fa1e95f251939`.Local and trusted-IP public `/` and `/healthz` return 200; Screener, LiveKit,coturn, and nginx are active with `NRestarts=0`. The public main Browser asset is-`assets/index-DLLdorRt.js` with SHA-256-`891b1fc861b12655d53a38c1dbf56d8981fa4ed24643760ed8d7838efcbf46f3`.+`assets/index-BtFMxoNI.js` with SHA-256+`885b9e50c57c64ac92cc8ffe5488d597bbb6fde6423e7a0b328efb9d1e943ad2`.-The release deploys the single Browser `screener-v9` wire, random four-digit+The release deploys the single Browser `screener-v10` wire, random four-digitmemory rooms with a 24-hour dormant lease, orthogonal grant/code admission,20-Viewer room admission, the uniform endpoint media-copy cap `2`, and theone-controller exact-candidate route runtime. A credential-free postflight sent-a well-formed authentication shape with stale `screener-v8`; it received+a well-formed authentication shape with stale `screener-v9`; it received`INVALID_MESSAGE` and WebSocket close 1008 before room authority without creatinga room. The service unit has no writable room StateDirectory; all room authorityis process-memory-only. LiveKit is dedicated, has `room.auto_create: false` and@@ -244,7 +244,7 @@ lifetime. An actively connected Host prevents expiry; explicit stop or Hostdisconnect starts the lease, and only the exact Host token renews it beforeexpiry. Viewer activity never renews ownership. `ROOM_DATABASE_PATH` and`ROOM_TTL_SECONDS` fail startup even when blank.-Production `39fcf93` accepts 1 through 20 and explicitly selects 20. This is an+Production `2726edd` accepts 1 through 20 and explicitly selects 20. This is anadmission limit, not evidence that every publisher, network, or quality profilecan sustain that many streams.`ENDPOINT_MEDIA_COPY_CAPACITY` defaults to 2 and accepts only 1, 2, or 3. It is@@ -257,8 +257,8 @@ must fail or wait before a fourth endpoint copy is issued.Supplying the removed `MAX_PEER_RELAY_DOWNSTREAM_EDGES`, even blank, failsstartup.-Production release `39fcf93` runs the deployed server and Browser assets-atomically on `screener-v9`; every stale Browser or executable-sender wire fails+Production release `2726edd` runs the deployed server and Browser assets+atomically on `screener-v10`; every stale Browser or executable-sender wire failsbefore room authority. Native senders and helpers are outside this release.Restore only an exact recorded release with its matching environment, unit,LiveKit, coturn, and firewall snapshot when rolling back.diff --git a/docs/project-memory.md b/docs/project-memory.mdindex c1a100eb..bae20ea7 100644--- a/docs/project-memory.md+++ b/docs/project-memory.md@@ -27,19 +27,19 @@ Last updated: 2026-08-24## Current Source And Production-- Production runs Browser runtime `39fcf93bae057fcbb1002702c3be6b90bac9027f`, release `39fcf93`, on `screener-v9`; current source uses the single `screener-v10` Browser wire. Auxiliary branches and older worktrees do not supersede canonical `main`.+- Exact main and production run Browser runtime `2726edde9b87f31fd76e749de47972ef817a9bd5`, release `2726edd`, on the single `screener-v10` Browser wire. Auxiliary branches and older worktrees do not supersede canonical `main`.- Current source and production admit up to `20` Viewers and implement the uniform `1/2/3` endpoint cap, exact prepare candidate, first-decoded-frame commit, strict rollback revision, decoded-progress stall, a two-stage direct/SFU operation deadline, and one event-driven room controller. A short-lived exact-generation decoded-frame observer proves only the pending candidate inside the existing total deadline; the periodic stats sampler remains responsible for active-path diagnostics and stalls. Ordinary peer ICE is STUN-only and the sole application fallback is SFU/UDP; stale TURN environment keys fail startup. SFU admission uses exact publication and Viewer-subscription handles with explicit no-default ingress/egress capacities and a listener-fenced dedicated LiveKit owner.- Current source and production use the memory-resident room model: random free four-digit codes, the configurable dormant lease, exact-Host resume, restart loss, local creation-preference replay, orthogonal Viewer grants and `open | password | disabled` code entry, and direct invitation/policy controls. SQLite room persistence, `ROOM_DATABASE_PATH`, `ROOM_TTL_SECONDS`, and a writable room StateDirectory are absent from the current runtime.-- Production runs from `/opt/screener/releases/39fcf93`. Its immutable runtime ZIP SHA-256 is `28190c3a69ec937d39ab5d49fdbc8db6a07e6013c2ddd5f5590bf8249bf6bce6`; `/opt/screener/backups/39fcf93-pre-v9-20260824T004257Z` is the verified rollback boundary and its `SHA256SUMS` hash is `1f741f29022f5eb1eb311a24f87f5f48598dca7b1879b88f9033c331fa06bd37`.-- Current source defaults new shares to VP8, keeps the diagnostic selector pre-share only and fixed for the share lifetime, uses `shareGeneration`-fenced Pause/Resume, and requires the v10 wire. Both source and production implement live 64/128/256 kbps audio-ceiling mutation, typed first-frame Viewer presentation, privacy-safe on-demand route diagnostics, neutral room-code denial, responsive entry controls, exactly three recommended profiles with `1080p30` as default and advanced-only `854x480`.+- Exact production artifacts, rollback boundary, services, and ports are owned by [deployment](./deployment.md) and indexed by [status](./status.md).+- Source and production default new shares to VP8, keep the diagnostic selector pre-share only and fixed for the share lifetime, use `shareGeneration`-fenced Pause/Resume, and require the v10 wire. They implement live 64/128/256 kbps audio-ceiling mutation, typed first-frame Viewer presentation, privacy-safe on-demand route diagnostics, neutral room-code denial, responsive entry controls, exactly three recommended profiles with `1080p30` as default and advanced-only `854x480`.- Browser SFU subscribers reconcile eligible Host screen publications across connect/activate event ordering, participant/track arrival, and reconnect. Production LiveKit logs only warn/error, and the application service has a bounded same-host LiveKit readiness preflight.- Exact v10 runtime source `fdd5a4a529ff297f41c05ea3388bf484d76afe8f` passed 610 Web tests in 45 files, TypeScript typecheck, client/server production builds, access/privacy, the 257-test SFU admission gate, dependency audit, and repository hygiene. Its one-Host/20-Viewer Chrome 151 loopback decoded every Viewer, propagated fixed VP8 settings, bounded Host/relay fanout at `2`, captured all current-child timing distributions, and observed no SFU publication. It is not public-network, SFU, mobile, physical audio/codec, H.264 performance, or background-lifecycle evidence.-- Postflight found `screener`, LiveKit, coturn, and nginx active with `NRestarts=0`; local and public `/` and `/healthz` return 200, every served client file matches the immutable release, the public Browser bundle contains `screener-v9` and no `screener-v8`, the release shares no regular-file inode with its rollback predecessor, and the accepted socket/firewall boundary is intact. No current v9 media room was created, so deployment evidence is not route or physical-media acceptance. Detail is owned by [deployment](./deployment.md) and [verification status](./verification-status.md).+- Postflight found `screener`, LiveKit, coturn, and nginx active with `NRestarts=0`; local and public `/` and `/healthz` return 200, every served client file matches the immutable release, the public Browser bundle contains `screener-v10` and no `screener-v9`, the release shares no regular-file inode with its predecessor, and the accepted socket/firewall boundary is intact. The LiveKit namespace remained empty, so deployment evidence is not route or physical-media acceptance. Detail is owned by [deployment](./deployment.md) and [verification status](./verification-status.md).- Chrome loopback, cap2/cap3, short resource, recovery, MBB, and A/V fixtures are bounded evidence only. They do not establish quality, resource limits, or product policy.## Current Priority-1. Integrate and atomically deploy the v10 Browser contract while controlled H.264 diagnosis starts in parallel. Physical direct/peer-relay/SFU evidence then selects the fixed Browser codec exposed by the product.+1. Use a physical direct comparison to select the fixed Browser codec; validate relay and SFU only if H.264 is selected.2. Run the mobile lifecycle matrix and later mechanism-simplification audit only at their stated boundaries; Native/executable and distribution work remain later product phases.## Working Rulesdiff --git a/docs/research/advanced-peer-distribution.md b/docs/research/advanced-peer-distribution.mdindex d3c8c1bb..d9aa6b76 100644--- a/docs/research/advanced-peer-distribution.md+++ b/docs/research/advanced-peer-distribution.md@@ -5,10 +5,10 @@interactive media, endpoint downstream cap `1..3`, and minimal central-servermedia egress; retained advanced-media measurements may cover smaller cohorts- Status: deterministic peer distribution and provisional make-before-break are- retained evidence. Exact Browser v9 source- `d543f38aacad3df5ef65fde1055cc8e733972afe` implements ADR-0005's single+ retained evidence. Exact Browser v10 source+ `fdd5a4a529ff297f41c05ea3388bf484d76afe8f` implements ADR-0005's singlechild-reparent reconciliation and exact first-frame transaction; production- now runs that v9 contract, and advanced encoded-media routes remain+ runs that v10 contract, and advanced encoded-media routes remainunimplemented candidatesThis document is research evidence, not current architecture or a backlog. See@@ -262,7 +262,7 @@ restarted. This proves LiveKit participant entry. The timing is consistent withthe then-current one-shot grant refresh and recovery state machine, but logs donot prove those transitions and cannot distinguishconnect, source, video publish, sender configuration, optional audio publish, or-transport failure. The deployed v9 diagnostic exposes only a closed local+transport failure. The deployed v10 diagnostic exposes only a closed localstage/outcome enum to an on-demand Host snapshot and deliberately keeps rawerrors, URLs, tokens, candidates, and addresses out of wire and logs.diff --git a/docs/research/browser-background-capture.md b/docs/research/browser-background-capture.mdindex 43b051e9..20c855fa 100644--- a/docs/research/browser-background-capture.md+++ b/docs/research/browser-background-capture.md@@ -36,18 +36,17 @@ does not say that minimizing the separate capturing page must reduce capture.Capture constraints are post-selection preferences and allow frame decimation,so requested `maxFramerate` is not proof of actual source or encoded frame rate.-The accepted default video preference is VP8. The deployed v9 runtime still-defaults to `automatic` until the next atomic Browser cutover. Every run must-record the actual negotiated codec and encoder rather than infer either from+The accepted and deployed default video preference is VP8. Every run records+the actual negotiated codec and encoder rather than inferring either fromthe preference. H.264, VP8, and encoder implementation are diagnostic variablesonly after a stable baseline exists; none is a page-keepalive mechanism.## Current Source Boundary-The source review covers exact Browser v9 source-`d543f38aacad3df5ef65fde1055cc8e733972afe`, integrated and deployed by exact-main `39fcf93bae057fcbb1002702c3be6b90bac9027f`. None of the v9 changes claims or-implements a page-keepalive mechanism, and the production cutover added no+The source review covers exact Browser v10 source+`fdd5a4a529ff297f41c05ea3388bf484d76afe8f`, integrated and deployed by exact+main `2726edde9b87f31fd76e749de47972ef817a9bd5`. The current path does not claim or+implement a page-keepalive mechanism, and deployment health supplies nophysical background-capture evidence.- `src/client/media/quality.ts` obtains one `getDisplayMedia()` stream, appliesdiff --git a/docs/research/browser-screen-audio-quality.md b/docs/research/browser-screen-audio-quality.mdindex 39cfc59f..3f1049ca 100644--- a/docs/research/browser-screen-audio-quality.md+++ b/docs/research/browser-screen-audio-quality.md@@ -6,10 +6,10 @@ Status: peer and SFU routes already use stereo and a 128 kbps default, but usersstill report speech-gated movie/game audio, including on a phone connecteddirectly through the SFU. Current Chromium web `getDisplayMedia()` defaults tolocal speech processing unless the request disables it. The source request is-explicit. Exact Browser v9 source-`d543f38aacad3df5ef65fde1055cc8e733972afe` exposes bounded 64/128/256 kbps+explicit. Current Browser v10 source+`fdd5a4a529ff297f41c05ea3388bf484d76afe8f` exposes bounded 64/128/256 kbpschoices, applies them to new P2P, browser-relay, and SFU senders, and implements-serialized live mutation with applied readback. Production now deploys that v9+serialized live mutation with applied readback. Production deploys that v10path. Target-device audible proof remains open.## Scope And Decision@@ -48,7 +48,7 @@ stereo music in a 64--128 kbps sweet spot, and LiveKit 2.22.0 names 128 kbps`musicHighQualityStereo`. Requested, applied, negotiated, and observed statesremain separate.-The advanced panel is named Share advanced settings. Exact v9 source stores the+The advanced panel is named Share advanced settings. Current v10 source stores the64/128/256 choice and applies that sender `maxBitrate` ceiling on the existingOpus path when it creates a sender. A change during an active share serializes`getParameters()`/`setParameters()` updates and readback, keeps media and the old@@ -463,7 +463,7 @@ A/V playout timing using a distinguishable stereo fixture plus game/film audio.## UI And Voice BoundaryShare advanced settings offers exactly 64/128/256 kbps and defaults to 128.-Exact v9 source applies the selected choice before sharing, to every newly+Current v10 source applies the selected choice before sharing, to every newlycreated P2P, browser-relay, or SFU sender, and through a serialized livemutation; production deploys the same path. It readsthe latest desired profile into each sender and keeps endpoint-local applieddiff --git a/docs/research/low-server-media-routes.md b/docs/research/low-server-media-routes.mdindex 807b7260..0783f978 100644--- a/docs/research/low-server-media-routes.md+++ b/docs/research/low-server-media-routes.md@@ -5,9 +5,9 @@low latency, and bounded host media fanout- Status: research and dated route evidence. Current invariants and assistedtransport roles are in [ADR-0005](../adr/0005-automatic-hybrid-media-routing.md).- Exact Browser v9 source `d543f38aacad3df5ef65fde1055cc8e733972afe`+ Exact Browser v10 source `fdd5a4a529ff297f41c05ea3388bf484d76afe8f`implements the current route transaction and diagnostics; production now runs- that v9 contract, while real-network validation remains in+ that v10 contract, while real-network validation remains in[verification status](../verification-status.md).## Current Transport Conclusion@@ -301,7 +301,7 @@ ingress/egress caps.## Privacy-Safe Route Diagnostic BoundaryStart with locally retained, redacted `webrtc-internals` as manual ground truth.-Production v9 deploys the user-initiated local stats export and route-timing+Production v10 deploys the user-initiated local stats export and route-timingsnapshot. It may observe only existingjoin, route-demand, operation-start, candidate-start, first-decoded-frame,settle, share-stop, departure, and room-delete events. It keeps one latest@@ -557,10 +557,10 @@ counters would not be deployment-wide admission.| Route | Where copies are emitted | Endpoint cost | Evidence status || --- | --- | --- | --- || Direct host P2P | Host emits one copy per Viewer | Host upload and sender pipelines grow with Viewers | Baseline evidence; current capacity is owned by the product contract |-| Bounded browser relay DAG | Host and each Web relay emit at most the configured endpoint cap | Ordinary browser, but every relay decodes and re-encodes and adds a hop | V9 source and production admit up to 20; the exact v9 local direct loopback gate passed, while heterogeneous networks remain open |+| Bounded browser relay DAG | Host and each Web relay emit at most the configured endpoint cap | Ordinary browser, but every relay decodes and re-encodes and adds a hop | V10 source and production admit up to 20; the exact v10 local direct loopback gate passed, while heterogeneous networks remain open || Native shared-encode host | Host targets one encode for standard WebRTC edges | libwebrtc public-API proxy risk spike, with Pion as fallback | Research evidence; still pays per-edge upload || Native volunteer encoded-RTP relay | Each volunteer forwards one encoded copy | Native install, RTP/RTCP forwarding, packaging, and opt-in relay policy | Research only; no current product authorization |-| SFU service | SFU emits authorized subscription copies | Service pays bounded egress; an authoritative Host publisher supplies media | Production deploys the v9 topology/admission; only a historical v8 production canary decoded media, so current heterogeneous-network/resource validation remains open |+| SFU service | SFU emits authorized subscription copies | Service pays bounded egress; an authoritative Host publisher supplies media | Production deploys the v10 topology/admission; local LiveKit functional evidence exists, while heterogeneous-network/resource validation remains open || SFU fallback | SFU emits authorized copies | Additional central ingress and egress cost | Deployed bounded path; real heterogeneous-network and resource acceptance remains open || SVC plus multiple trees | Peers emit striped layer copies across several trees | Layer scheduling, reassembly, redundancy, and more churn state | Separate conditional spike; target endpoint upload near `B` || Network coding | Peers or servers emit coded blocks | Generations, buffering, decoding, integrity, and a custom media plane | Trace/FEC spike only; optimize loss recovery, not clean bandwidth |diff --git a/docs/research/peer-assisted-media.md b/docs/research/peer-assisted-media.mdindex 043bbd98..d048c51e 100644--- a/docs/research/peer-assisted-media.md+++ b/docs/research/peer-assisted-media.md@@ -2,11 +2,11 @@- Research date: 2026-08-22- Scope: one game-screen broadcaster and an accepted admission target of twenty- trusted viewers; exact v9 direct-loopback evidence reaches twenty and the+ trusted viewers; exact v10 direct-loopback evidence reaches twenty and theearlier resource/quality gate remains eight-- Status: historical evidence plus the bounded controller. Exact Browser v9- source `d543f38aacad3df5ef65fde1055cc8e733972afe` implements the current- ADR-0005 route transaction, and production now runs that v9 contract. A+- Status: historical evidence plus the bounded controller. Exact Browser v10+ source `fdd5a4a529ff297f41c05ea3388bf484d76afe8f` implements the current+ ADR-0005 route transaction, and production runs that v10 contract. Ahistorical v8 canary decoded SFU media. Heterogeneous-network, mobile,resource, and endurance evidence remains open.@@ -232,15 +232,15 @@ networks.## Implemented Bounded Quality CoordinationThe implementation coordinates one strict `QualitySettings` object across the-peer-assisted tree without adaptation logic. Exact v9 source accepts advanced+peer-assisted tree without adaptation logic. Exact v10 source accepts advanced480p/720p/1080p/1440p resolution values, integer 15-60 fps, integer 2-12 Mbps,and the three standard degradation preferences; missing, extra, or out-of-rangefields fail schema validation. The three visible presets are recommendationsrather than wire IDs, and `480p` is only the advanced 854x480 resolution. Theserver stores the latest complete object in a room-count-bounded in-memory map,-defaults to 1080p30 at 5 Mbps with balanced priority in v9 source, includes it in+defaults to 1080p30 at 5 Mbps with balanced priority in v10 source, includes it inpeer-assisted authenticated snapshots, and broadcasts Host changes to online-Viewers. Production v9 uses the same 1080p30 default and advanced 480p boundary.+Viewers. Production v10 uses the same 1080p30 default and advanced 480p boundary.The value survives a stopped share, is removed withthe room, and is not persisted.Ordinary P2P authentication remains unchanged and@@ -529,7 +529,7 @@ event arrives later. The application therefore needs a small text-messagechallenge rather than waiting for either protocol Ping/Pong or the old socket'sclose event.-Deployed v9 sends+Deployed v10 sends`signaling-challenge { sequence }`, and the server sends the exact`signaling-challenge-response { sequence }` only to that requesting socket.Server and Browser assets deploy atomically; stale Browser and executable-sender@@ -547,7 +547,7 @@ socket generation are ignored, and the server revalidates the currentauthenticated session before replying. A hidden document, a visibilityrestore, or an obviously late timer callback clears pending evidence and startsa fresh five-second baseline instead of declaring failure.-This response-only watchdog is deployed in v9;+This response-only watchdog is deployed in v10;real silent-partition timing remains a production/browser evidence boundary.The response is socket-local, contains no room state, secret, candidate, or rawdiff --git a/docs/research/realtime-quality-adaptation.md b/docs/research/realtime-quality-adaptation.mdindex 7e064169..e1f2d203 100644--- a/docs/research/realtime-quality-adaptation.md+++ b/docs/research/realtime-quality-adaptation.md@@ -11,7 +11,7 @@ others. `maintain-framerate` may preserve motion by reducing resolution untilgame UI, maps, subtitles, and text become unreadable; `maintain-resolution`may instead lower frame rate. Neither preference overrides congestion control.-Exact Browser v9 source `d543f38aacad3df5ef65fde1055cc8e733972afe`+Current Browser v10 source `fdd5a4a529ff297f41c05ea3388bf484d76afe8f`uses `balanced` as the recommended profile and advanced default;`maintain-resolution` and `maintain-framerate` remain explicit choices. Thesepreferences leave actual degradation to the browser, so Screener observes@@ -48,9 +48,8 @@ Screener therefore does not compute a weighted route score, probe alternativeparents, or reparent a currently decoding edge for bitrate, resolution, FPS,freeze ratio, RTT, jitter, loss, or limitation evidence. Only a hard`failed/closed` connection or the existing non-paused decoded-frame stall makes-the exact edge invalid. Exact v9 source deletes the unused-`parent-edge-quality-evidence` message rather than giving it a threshold-based-meaning. Primary sources checked 2026-08-24: [RFC+the exact edge invalid. The current wire carries no parent-wide quality evidence+or threshold-based route authority. Primary sources checked 2026-08-24: [RFC8836](https://www.rfc-editor.org/rfc/rfc8836.html),[Overcast](https://www.usenix.org/legacy/publications/library/proceedings/osdi2000/full_papers/jannotti/jannotti_html/index.html),[Narada](https://www.cs.cmu.edu/~srini/papers/papers/2002-Chu-jsac/2002-Chu-jsac.pdf),@@ -212,7 +211,7 @@ retain the result as current publisher state. This changes no captureconstraint, codec, representation, subscriber layer or route policy and doesnot explain an immediate same-publication report.-Host SFU publisher A+B remains a separate observability slice. Exact v9 source+Host SFU publisher A+B remains a separate observability slice. Current v10 sourceimplements one two-second, publication-generation-bound local sampler owned by`SfuPublisher`: merge its video/audio `LocalTrack` reports, reuse the existingstrict stats parser and accumulator, correlate capture settings from the owned@@ -222,7 +221,7 @@ baseline. `HostSfuRoute` may expose that local snapshot to one Host-onlypublisher row; it must not duplicate the shared Host-to-SFU ingress inside eachSFU Viewer card. Viewer inbound remains the per-Viewer C signal. This needs nowire, server telemetry, global score, selector or new UI framework. Production-deploys this v9 publisher view; its target-browser fields and values still need+deploys this v10 publisher view; its target-browser fields and values still needphysical evidence.## Codec Preference And Evidence Boundary@@ -720,7 +719,7 @@ latency, CPU, and memory conflict and must be balanced. Its native encodertuning and hardware integration are not available to a browser-only sender andmust not be presented as settings this project already has.-## Current Source V9 Policy+## Current Source V10 PolicyThe three user-visible profiles remain ceilings rather than promised rates:@@ -730,10 +729,10 @@ The three user-visible profiles remain ceilings rather than promised rates:| 1080p30 | 1920x1080 at 30 fps | 5 Mbps || 720p30 | 1280x720 at 30 fps | 3 Mbps |-V9 source and production default to the middle `1080p30` ceiling. Choosing that+V10 source and production default to the middle `1080p30` ceiling. Choosing thatdefault trades a 60 fps ceiling for a 1080p capture bound. The recommended setremains exactly the three profiles-above. V9 adds+above. V10 adds`480p` only as an advanced `854x480` resolution whose frame rate and bitrate areselected independently, not as a fourth profile or preset ID. LiveKit currentlyuses the same 1080p30 at 5 Mbps screen-share preset, but neither preset@@ -776,7 +775,7 @@ guarantees the emitted resolution, frame rate, or bitrate.- Pausing sharing disables every track in the current capture stream, producingblack video and silence without closing the room or media connection.-The deployed v9 implementation deliberately stops at manual bounded controls.+The deployed v10 implementation stops at manual bounded controls.It adds no composite score, periodicadjustment, automatic codec forcing, SDP bitratemanipulation, or scene detector. Three consecutive samples of one non-`none` nativediff --git a/docs/session-handoff.md b/docs/session-handoff.mdindex f5a85d6b..9a9eebf8 100644--- a/docs/session-handoff.md+++ b/docs/session-handoff.md@@ -32,9 +32,8 @@ Current high-signal boundary:- docs/status.md owns the exact source/production/hold state.- docs/todo.md is the only executable work ledger and owns ordering.- ADR-0005 owns the accepted automatic route model: direct/STUN peer followed- only by the dedicated LiveKit SFU/UDP fallback. Exact Browser runtime- `39fcf93bae057fcbb1002702c3be6b90bac9027f` is integrated and deployed as- release `39fcf93` on the single `screener-v9` wire. It uses one short-lived+ only by the dedicated LiveKit SFU/UDP fallback. Current source and production+ use the single `screener-v10` wire. The route uses one short-livedexact-generation decoded-frame observer only for the pending candidate insidethe existing total deadline; the periodic stats sampler still owns active-pathdiagnostics and stalls. Real external-network and SFU media evidence remains@@ -43,26 +42,13 @@ Current high-signal boundary:- ADR-0002 owns the implemented room model: one process-memory RoomStore,random free four-digit codes, configurable 24-hour dormant leases, restartloss, local Host preference replay, an independent expiring Viewer grant, and- open/password/disabled code entry. Current source uses `screener-v10`,- production uses `screener-v9`, and neither runtime uses SQLite; exact rollback- artifacts are owned by deployment.-- Exact v10 runtime source `fdd5a4a529ff297f41c05ea3388bf484d76afe8f`- defaults Browser sharing to VP8, keeps the temporary codec selector pre-share- only, fixes codec preference for the share lifetime, uses ordinary- `shareGeneration`-fenced Pause/Resume, and uses the single v10 wire. It passed- 610 Web tests in 45 files, typecheck, client/server- builds, access/privacy, SFU admission, dependency audit, repository hygiene,- and a 20-Viewer Chrome direct-loopback gate. That evidence does not establish- H.264 performance, public-network behavior, or SFU packet flow.-- Production runs exact `39fcf93bae057fcbb1002702c3be6b90bac9027f`, release- `39fcf93`, wire `screener-v9`. The immutable runtime ZIP SHA-256 is- `28190c3a69ec937d39ab5d49fdbc8db6a07e6013c2ddd5f5590bf8249bf6bce6`;- `/opt/screener/backups/39fcf93-pre-v9-20260824T004257Z` is the verified- rollback boundary and its `SHA256SUMS` hash is- `1f741f29022f5eb1eb311a24f87f5f48598dca7b1879b88f9033c331fa06bd37`.- Postflight proved service health, exact public assets, v9/no-v8, release- ownership/inode isolation, socket/firewall continuity, and rollback checksum- without creating a media room; physical route/media evidence remains open.+ open/password/disabled code entry. Neither source nor production uses SQLite;+ exact rollback artifacts are owned by deployment.+- Browser sharing defaults to VP8, keeps the diagnostic codec selector pre-share+ only, fixes codec preference for the share lifetime, and uses+ `shareGeneration`-fenced Pause/Resume. Exact source gates and production+ artifacts are owned by verification status and deployment; physical H.264,+ heterogeneous-network, and SFU media evidence remains open.- Ordinary browser ICE owns direct reachability. Do not build port prediction,guessed candidates, NAT classification, TCP probes, quality scores, orquality-driven reparenting. Current-path quality is diagnostic; a healthydiff --git a/docs/status.md b/docs/status.mdindex 39dc89d5..64250f76 100644--- a/docs/status.md+++ b/docs/status.md@@ -6,16 +6,16 @@ This is the current execution index. Git history owns completed timelines; [veri## Production-- `https://share.bonfire.icu` runs exact integrated main `39fcf93bae057fcbb1002702c3be6b90bac9027f`, release `39fcf93`, wire `screener-v9`, from `/opt/screener/releases/39fcf93`. Its immutable runtime ZIP SHA-256 is `28190c3a69ec937d39ab5d49fdbc8db6a07e6013c2ddd5f5590bf8249bf6bce6`; `/opt/screener/backups/39fcf93-pre-v9-20260824T004257Z` is the verified rollback boundary and its `SHA256SUMS` hash is `1f741f29022f5eb1eb311a24f87f5f48598dca7b1879b88f9033c331fa06bd37`.-- `screener`, LiveKit, coturn, and nginx are active/running; local/public `/` and `/healthz` return 200 and all four services report `NRestarts=0`. Every served client file matches the immutable release, `assets/index-DLLdorRt.js` has SHA-256 `891b1fc861b12655d53a38c1dbf56d8981fa4ed24643760ed8d7838efcbf46f3`, contains one `screener-v9` literal and no `screener-v8`, and the retired v8 asset returns 404.-- The release is root-owned, has no group/world-writable real file or directory, has no dangling or escaping symlink, and shares zero regular-file inodes with release `8f5b3f1`. The service process resolves its working directory to exact release `39fcf93`; it has no writable room `StateDirectory` or SQLite runtime.+- `https://share.bonfire.icu` runs exact integrated main `2726edde9b87f31fd76e749de47972ef817a9bd5`, release `2726edd`, wire `screener-v10`, from `/opt/screener/releases/2726edd`. Its immutable runtime ZIP SHA-256 is `07fa6500300bfedc9cedccb0db761b70a9ada8dd77608153728e34835f4e1b78`; `/opt/screener/backups/2726edd-pre-v10-20260824T025357Z` is the verified rollback boundary and its `SHA256SUMS` hash is `62d19aa0a3ec400477a4c76121eb0e9e4d553d024404f3da054fa1e95f251939`.+- `screener`, LiveKit, coturn, and nginx are active/running; local/public `/` and `/healthz` return 200 and all four services report `NRestarts=0`. Every served client file matches the immutable release, `assets/index-BtFMxoNI.js` has SHA-256 `885b9e50c57c64ac92cc8ffe5488d597bbb6fde6423e7a0b328efb9d1e943ad2`, contains one `screener-v10` literal and no `screener-v9`, and the retired v9 asset returns 404.+- The release is root-owned, has no group/world-writable real file or directory, has no dangling or escaping symlink, and shares zero regular-file inodes with release `39fcf93`. The service process resolves its working directory to exact release `2726edd`; it has no writable room `StateDirectory` or SQLite runtime.- Production admits one Host plus 20 Viewers, applies endpoint capacity `2`, rejects stale Browser and executable-sender wires before room authority, and runs the one-controller exact-candidate route model with one staged total deadline. Rooms use random free four-digit codes, a 24-hour dormant lease, restart loss, local Host creation preferences, independent Viewer grants, and `open | password | disabled` code entry. LiveKit remains dedicated with `room.auto_create: false`, `max_participants: 21`, and global admission `1` publication ingress / `20` subscription egress.- Production media ports are STUN-only UDP 3478 and LiveKit UDP 7882; coturn TCP/TLS and relay ranges are disabled. The public Web ingress remains TCP 80/443; Node 8787 and LiveKit control/signaling 7880 are internal-only. These deployment facts do not close the real heterogeneous-network, SFU, mobile, or endurance evidence boundaries.-- SFU subscribers reconcile Host screen publications across connect, activation, participant arrival, track publication, and reconnect. LiveKit runs at `warn`/Pion `error`, and the Screener unit waits boundedly for the same-host LiveKit control listener before startup. Postflight created no v9 media room, so physical direct, peer-relay, and SFU behavior remains an open current-release gate.+- SFU subscribers reconcile Host screen publications across connect, activation, participant arrival, track publication, and reconnect. LiveKit runs at `warn`/Pion `error`, and the Screener unit waits boundedly for the same-host LiveKit control listener before startup. Postflight left the LiveKit namespace empty, so physical direct, peer-relay, and SFU behavior remains an open current-release gate.## Current Source-- Canonical root `main` is the source and integration truth. Current source uses the single Browser `screener-v10` boundary and rejects stale v9 clients before room authority; auxiliary branches and older worktrees do not supersede it. Production remains on v9 until the atomic cutover recorded below.+- Canonical root `main` is the source and integration truth. Current source and production use the single Browser `screener-v10` boundary and reject every other wire before room authority; auxiliary branches and older worktrees do not supersede it.- Current source implements one Host plus up to `20` Viewers, one steady outbound media-copy cap for every non-server endpoint (default `2`, static `1/2/3`), and the process-memory room model with random four-digit codes, a default 24-hour dormant lease, exact-Host resume, restart loss, local Host preference replay, independent token invitations, `open | password | disabled` code entry, and no SQLite runtime.- One event-driven controller owns the committed graph and at most one room-serial child operation. It uses one deterministic candidate list/cursor and one total direct-then-SFU deadline; exact admission and physical resources remain charged through drain, and the pending candidate commits only after an exact-generation decoded-frame proof. A short-lived 100 ms stats observer proves only that candidate inside the existing deadline, while the 2-second sampler remains responsible for active-path diagnostics and decoded-frame stalls. Healthy edges remain sticky and current-path quality does not authorize reparenting.- Ordinary peer ICE is STUN-only and the only application fallback is the dedicated LiveKit SFU over UDP. SFU generations use explicit no-default ingress/egress capacities, exact `reserved | committed | draining` accounting, delete-plus-absence release, one Host publication, and exact Viewer subscription handles. No Screener TURN, ICE/TCP, media TCP, or TLS-relayed media route exists.@@ -26,9 +26,9 @@ This is the current execution index. Git history owns completed timelines; [veri## Current Milestone-1. Integrate and deploy the v10 Browser contract atomically while controlled H.264 diagnosis runs in parallel.-2. Use physical direct, peer-relay, and SFU evidence to choose the fixed Browser codec exposed by the product.-3. Validate live audio ceilings on physical direct, peer-relay, and SFU paths, then reproduce the Host background/minimized report under controlled conditions while recording the actual negotiated codec.+1. Use a physical direct comparison to choose the fixed Browser codec; validate relay and SFU only if H.264 is selected.+2. Diagnose the reported screen-audio `1 kbps` readout and validate live audio ceilings, then refine the Host invitation controls without changing grant semantics implicitly.+3. Reproduce the Host background/minimized report under controlled conditions while recording the actual negotiated codec.4. Finish representative ICE/STUN/SFU acceptance including mobile networks. Browser port prediction, NAT classification, TCP probing, fake page keepalive, and quality-driven reparenting remain outside the accepted model.## Active Boundaries@@ -36,14 +36,12 @@ This is the current execution index. Git history owns completed timelines; [veri- `fix/configurable-relay-cap` is an old, incomplete draft and must not be merged as-is.- Open PR #192 and the Native stack are evidence/research, not pending product releases. Native senders, capture helpers, shared-encode executables, and their test binaries are outside the current Browser milestone and are not built or run.- Deployed surfaces and retained candidates that still need product decisions are indexed only in [the TODO ledger](./todo.md); do not extend or roll them back automatically.-- GitHub Actions run `32677084865` for the v9 integration did not start a step (`runner_id=0`) because the account payment or spending limit blocked runner allocation. It produced no code evidence and was not retried; the exact local gates remain the current source evidence.-- Room lifetime, authorization/storage semantics, restart loss, Browser v9 entry/presentation, and rollback restoration are aligned between exact main and production.+- Room lifetime, authorization/storage semantics, restart loss, Browser v10 entry/presentation, and rollback restoration are aligned between exact main and production.- Real SFU recovery, heterogeneous networks, mobile lifecycle, audio/A-V device behavior, and endurance/resource measurements remain external acceptance evidence, not blockers for unrelated reversible work.## Current Hold-There is no active P0/P1 source or deployment hold. The Browser v10 contract is implemented and-locally gated, while production remains the postflight-clean v9 release until the atomic cutover. Source-and production must remain reported separately. Physical H.264 quality, audio, heterogeneous-network, SFU,+There is no active P0/P1 source or deployment hold. Exact main and production run the postflight-clean+Browser v10 contract. Physical H.264 quality, audio, heterogeneous-network, SFU,background, and mobile evidence remains open. Native/executable work and broad repository cleanupremain outside the current evidence boundary.diff --git a/docs/todo.md b/docs/todo.mdindex c92b749c..2edb94bd 100644--- a/docs/todo.md+++ b/docs/todo.md@@ -6,9 +6,9 @@ Only items in **Now** are executable after their stated decision gate. A branch## Now-1. **Deploy Browser v10 atomically.** Current source defaults new shares to VP8, keeps `automatic | H.264 | VP8` as a pre-share diagnostic choice fixed for that share, uses `shareGeneration`-fenced Pause/Resume, and exposes the single v10 wire. Complete integration, deploy server and Browser assets together, reject stale v9 before room authority, and record the exact release boundary.-2. **Classify H.264 in parallel and select one fixed Browser codec.** Reproduce the dated blur/performance report on the same Host, browser, driver, game scene, and wired direct Viewer while changing one variable at a time. Validate fresh shares on physical direct, browser-relay, and SFU paths, choose VP8 or H.264 from actual codec/profile/encoder and capture/sender/Viewer evidence, and make that codec the only Browser product choice.-3. **Physically validate live screen-audio ceilings.** With audible game/music capture, switch 64/128/256 kbps while sharing across direct, browser-relay, and SFU paths, then create a new edge and switch source. Record sender readback, observed bitrate, route continuity, audible result, and A/V synchronization. Treat every setting as a ceiling, and do not infer fidelity or room-wide atomic convergence from configuration alone.+1. **Classify H.264 and select one fixed Browser codec.** Reproduce the dated blur/performance report on the same Host, browser, driver, game scene, and wired direct Viewer while changing one variable at a time. Choose VP8 or H.264 from fresh direct-share codec/profile/encoder and capture/sender/Viewer evidence, and make that codec the only Browser product choice. Validate browser relay and SFU only if the direct comparison selects H.264.+2. **Diagnose and physically validate live screen audio.** First reproduce the Host diagnostic remaining at `1 kbps` after switching the shared source, and distinguish stale/reset statistics from an actual RTP bitrate problem. The app already requests audio and supplies system/window audio hints; record the selected surface, returned audio track, sender/receiver counters, and audible result because the browser owns the picker and may still return video only. Then switch the 64/128/256 kbps ceilings across direct, browser-relay, and SFU paths, create a new edge, and switch source while checking route continuity and A/V synchronization. Do not infer fidelity or room-wide atomic convergence from configuration alone.+3. **Redesign the Host invitation controls.** Replace the current raw-link-heavy block with a compact copy-first layout while preserving the accepted copy-link, copy-room-code, code-entry policy, rotate, and revoke actions. Keep the credential out of logs and request URLs; changing the copied credential length is blocked on the explicit product decision below.4. **Diagnose desktop Host background/minimized performance.** On the same machine, dynamic scene, direct Viewer, browser, and fresh share, compare foreground, occluded, minimized, and hidden states while recording the actual negotiated codec. Correlate capture settings/FPS, frames captured/encoded/sent/decoded, bitrate, `qualityLimitationReason`, encode time, browser/game CPU and GPU, and the existing local-preview pause boundary. Treat browser scheduling/throttling and codec effects as hypotheses until measured. Do not spoof page activity, add keepalive timers, or misuse Wake Lock; if current Chrome/Edge cannot preserve the accepted Host behavior through standard Web APIs, record that capability boundary before considering the packaged/native Host.5. **Finish real-network route acceptance.** Measure standard ICE/STUN direct paths, peer relay, SFU ingress/subscription, exact first-frame commit and rollback, relay-ingress repair with subtree retention, disconnect/capacity drain, Pause/Resume, and bounded explicit failure across representative IPv4/IPv6 NATs and mobile networks. Include an all-UDP-blocked case to establish the current failure boundary. Do not add port prediction, NAT classification, TCP probes, guessed candidates, route scores, or quality-driven reparenting.@@ -31,6 +31,7 @@ These items are real product work, ordered after the current physical-media, rea| #169 connection self-check | Keep, revise, or remove the user-facing pre-share probe. Do not extend it automatically. || #181 selected-pair response counter | Keep as local observation or remove; it has no route authority. || #182 signaling watchdog | Confirm Host and mobile/background session semantics before calling it complete. |+| Viewer invitation credential length | The current grant is about 62 characters because its 43-character random suffix is the shortest base64url encoding of the accepted 256-bit secret. Decide whether a shorter copied URL justifies changing that security requirement or adding server-side indirection; do not truncate it ad hoc. || Project license and closed-commercial boundary | Decide the repository and distribution license before any public release or package distribution. GPL/AGPL implementations remain research-only until then. |These decisions are not permission to continue old branches, and current deployment remains unchanged until a scoped decision is made.diff --git a/docs/verification-status.md b/docs/verification-status.mdindex 58e94f17..c199a049 100644--- a/docs/verification-status.md+++ b/docs/verification-status.md@@ -10,30 +10,16 @@ Capacity and routing entries below describe the exact tested source or release o## Deployment Evidence-- Production runs exact `39fcf93bae057fcbb1002702c3be6b90bac9027f`, release `39fcf93`, wire `screener-v9`, from `/opt/screener/releases/39fcf93`. The immutable runtime ZIP SHA-256 is `28190c3a69ec937d39ab5d49fdbc8db6a07e6013c2ddd5f5590bf8249bf6bce6`.-- `/opt/screener/backups/39fcf93-pre-v9-20260824T004257Z` retains the exact pre-v9 current target plus application environment, systemd, LiveKit, coturn, nft, and nginx boundary; its internal manifest SHA-256 is `1f741f29022f5eb1eb311a24f87f5f48598dca7b1879b88f9033c331fa06bd37`.-- The 2026-08-24 v9 postflight found `screener`, LiveKit, coturn, and nginx active with zero restarts and local/public health at 200. Public root and all referenced assets returned 200; `assets/index-DLLdorRt.js` matched the release artifact SHA-256 `891b1fc861b12655d53a38c1dbf56d8981fa4ed24643760ed8d7838efcbf46f3` and contains the single `screener-v9` wire with no `screener-v8` literal.-- A public stale-v8 signaling probe reached the v9 server and received the fatal stale-client result before role or room authority. The probe created no room, and the service remained healthy with zero restart.-- GitHub Actions run `32677084865` for integration commit `39fcf93` started no step (`runner_id=0`) because account payment or spending-limit state prevented runner allocation. It has no logs, was not retried, and is neither validation evidence nor a source failure; the exact local gates below remain the available source evidence.+- Production runs exact `2726edde9b87f31fd76e749de47972ef817a9bd5`, release `2726edd`, wire `screener-v10`, from `/opt/screener/releases/2726edd`. The immutable runtime ZIP SHA-256 is `07fa6500300bfedc9cedccb0db761b70a9ada8dd77608153728e34835f4e1b78`; its 38-file manifest SHA-256 is `c4ed6321fa3ac8b4c766a7e575d26f8fd4ec2ea929a9addefb7944abafa5b663`.+- `/opt/screener/backups/2726edd-pre-v10-20260824T025357Z` retains the exact pre-v10 current target plus application environment, systemd, LiveKit, coturn, nft, and nginx boundary; its internal manifest SHA-256 is `62d19aa0a3ec400477a4c76121eb0e9e4d553d024404f3da054fa1e95f251939`.+- Postflight found `screener`, LiveKit, coturn, and nginx active with zero restarts and no warning-level Screener journal entries. Local/public root, health, and all six client files matched the release; `assets/index-BtFMxoNI.js` has SHA-256 `885b9e50c57c64ac92cc8ffe5488d597bbb6fde6423e7a0b328efb9d1e943ad2` and contains `screener-v10` with no `screener-v9`. A stale-v9 authentication received `INVALID_MESSAGE` and close 1008 before room authority.- Production uses endpoint capacity `2`, room admission `20`, random free four-digit memory rooms, `ROOM_LEASE_SECONDS=86400`, a dedicated LiveKit instance with `room.auto_create: false` and `max_participants: 21`, and global SFU admission `1` ingress / `20` egress. Room authority is process-memory-only. Coturn is `stun-only`, `no-tcp`, and `no-tls`; only UDP 3478 listens, and nft exposes only UDP 3478/7882 for Screener media.-- The production service orders Screener after LiveKit and boundedly waits for its control listener. Current journals use warn/Pion-error logging, contain zero `PublisherOffer` record, and the current/rollback release regular-file sets share zero inodes.-- This postflight proves archive identity, atomic application/assets, stale-wire rejection, process health, listener/firewall continuity, log sentinels, and rollback readiness only. It did not create a current v9 media room or exercise direct, peer-relay, SFU, audio, codec, mobile, quality, or endurance behavior.-- A historical v8 production canary forced one peer and two active 1920x1080 SFU roots over LiveKit UDP and decoded all three Viewers. It remains dated infrastructure/path evidence, not a current v9 media acceptance result.+- The production service orders Screener after LiveKit and boundedly waits for its control listener. The LiveKit namespace is empty, the release shares zero regular-file inodes with `39fcf93`, and the nft ruleset matches the rollback snapshot.+- This postflight proves archive identity, atomic application/assets, stale-wire rejection, process health, listener/firewall continuity, log sentinels, and rollback readiness only. It did not exercise direct, peer-relay, SFU, audio, codec, mobile, quality, or endurance behavior.## Retained Functional Evidence- Exact v10 runtime source `fdd5a4a529ff297f41c05ea3388bf484d76afe8f` passed repository hygiene, TypeScript typecheck, client and server production builds, all 610 Web tests in 45 files, the 257-test SFU admission gate, the access/privacy Browser gate, and the production-dependency audit with zero vulnerabilities. Its one-Host/20-Viewer Chrome 151 direct-loopback report passed all seven assertions: all Viewers decoded, fixed VP8 settings reached every participant, Host and relay media edges stayed within cap `2`, no orphan SFU publication appeared, and all four current-child timing distributions contained 20 values. The report SHA-256 is `802CBB7632E9AEA3C39FE831A7F7880D24140B2E83942CE0DFDA05DE4B408EED`. This validates the v10 source boundary, not H.264 quality, hardware attribution, physical capture, public-network behavior, or SFU packet flow.-- Exact Browser v9 source `d543f38aacad3df5ef65fde1055cc8e733972afe`, integrated by deployed main `39fcf93bae057fcbb1002702c3be6b90bac9027f`, passed repository hygiene, TypeScript typecheck, client and server production builds, all 670 Web tests in 48 files, the access/privacy Browser gate, and the production-dependency audit with zero vulnerability. This covers the in-memory room/access boundary, v9 protocol, one serialized exact-candidate route controller, generation-bound first-decoded-frame proof, physical resource retention, SFU lifecycle and admission, paused codec transition/rollback/source authority, live media-setting mutation, on-demand route observability, Viewer presentation state, and entry UI. These are local source/state-machine/build gates, not heterogeneous-network, target-device quality, or real LiveKit packet-flow proof.-- The same exact v9 source passed the required one-Host/20-Viewer local Browser gate with endpoint cap `2`; report SHA-256 is `EB879256C13C75FF1C7F3BC313DE1681FC5D89FC1F51D63B96ECD3ECB93DD09F`. Queue, candidate, first-frame, and final timing each recorded `20/0` populated/missing values. The sorted millisecond evidence is:-- | Timing | Raw values (ms) | p50 / p95 / max (ms) |- | --- | --- | --- |- | Queue | `1, 975, 1170, 1339, 1691, 1814, 2008, 2258, 2508, 2749, 2998, 3237, 3467, 3695, 3795, 4037, 4268, 4498, 4629, 4862` | `2749 / 4629 / 4862` |- | Candidate | `2, 976, 1171, 1339, 1692, 1814, 2008, 2258, 2509, 2749, 2998, 3237, 3467, 3695, 3795, 4037, 4268, 4498, 4629, 4863` | `2749 / 4629 / 4863` |- | First frame | `1334, 1349, 1421, 1708, 1824, 2062, 2258, 2506, 2749, 3017, 3239, 3478, 3706, 3835, 4036, 4272, 4508, 4641, 4874, 5104` | `3017 / 4874 / 5104` |- | Final | `1334, 1349, 1421, 1708, 1824, 2062, 2258, 2506, 2749, 3017, 3239, 3478, 3706, 3835, 4036, 4272, 4508, 4641, 4874, 5104` | `3017 / 4874 / 5104` |-- This gate used local direct loopback media and observed no SFU route. It proves bounded local direct convergence at exact admission `20`; it does not prove public-network traversal, SFU fallback, visual quality, target-device resources, or endurance.- Chrome 151 synthetic `1/3/5/8` and 720p30 runs preserved bounded fanout and decoding. A `9461e20`-era three-Viewer rerun kept Host2/Browser Viewer1, decoded every Viewer, and recovered a hard first-level relay departure in 5,380 ms; it did not exercise quality-triggered MBB. Sixteen-Viewer cap2/cap3 loopbacks decoded all Viewers and a ten-second follow-up recorded guarded sender and aggregate Chromium CPU evidence, but resolution/FPS remained low and the ordinary-PC data cannot rank caps, select product policy, or prove sustainable heterogeneous-network quality. See [peer-assisted media](./research/peer-assisted-media.md).- Chrome 151 with local LiveKit 1.13.5/client 2.22.0 proved one SFU/UDP root after `q,f` -> `q,h`: decoded frames advanced 3 -> 23, rendered frames reached 26, Host used one edge, and leaves were clean. This is functional evidence only. See [low-server media routes](./research/low-server-media-routes.md).- Host A+B and authenticated P2P Viewer C evidence is sanitized, generation-bound, diagnostic-only, and closed for stale or ambiguous reports. Production can expose a Host-local current SFU `h` snapshot and clears it on publisher identity changes; raw media metadata is not retained. See [realtime quality adaptation](./research/realtime-quality-adaptation.md).@@ -42,16 +28,16 @@ Capacity and routing entries below describe the exact tested source or release o## Open Proof Boundaries-- Routing: exact v9 local direct loopback covers admission-20 initial ingress and exact-candidate first-frame commit timing. Still verify rollback, direct-stage exhaustion and SFU admission, relay-ingress reparent with subtree retention, disconnect/effective-capacity drain, pause/resume, and bounded failure on real browser/media paths. Silent control partitions may wait 30 to 60 seconds for heartbeat detection before the default five-second grace; a non-paused decoded-frame stall may invalidate only that exact child edge.+- Routing: exact v10 local direct loopback covers admission-20 initial ingress and exact-candidate first-frame commit timing. Still verify rollback, direct-stage exhaustion and SFU admission, relay-ingress reparent with subtree retention, disconnect/effective-capacity drain, pause/resume, and bounded failure on real browser/media paths. Silent control partitions may wait 30 to 60 seconds for heartbeat detection before the default five-second grace; a non-paused decoded-frame stall may invalidate only that exact child edge.- Quality: production startup blur remains unclassified. One same-`balanced` local A/B retained route/PC/SSRC/track while 720p rose to 1080p, but natural ramp prevents causal, production, or SFU conclusions. Correlate Host capture/encode/send with Viewer receive/decode before changing policy.-- Relay resources: v9 source and production expose the authenticated `1/2/3` endpoint-cap boundary, and local loopback evidence covers 20 Viewers at cap `2`. CPU/GPU/upload and heterogeneous-network measurements remain diagnostics, not authority to change the contract.-- Room scale: v9 source and production admit 20 Viewers plus one Host, and the exact v9 local Browser convergence gate covers that bound on direct loopback. A real public-network 1:20 session, quality, and sustained resource matrix remain open.+- Relay resources: v10 source and production expose the authenticated `1/2/3` endpoint-cap boundary, and local loopback evidence covers 20 Viewers at cap `2`. CPU/GPU/upload and heterogeneous-network measurements remain diagnostics, not authority to change the contract.+- Room scale: v10 source and production admit 20 Viewers plus one Host, and the exact v10 local Browser convergence gate covers that bound on direct loopback. A real public-network 1:20 session, quality, and sustained resource matrix remain open.- SFU: production uses one Host publication with exact Viewer subscriptions and no fixed root-count or room-wide lease rule. Real LiveKit lifecycle/JWT replay, shaped packet-flow, BWE downshift/recovery, resource use, and SFU-fed first-child evidence remain open. Use Linux `tc` or an authorized public canary for per-leaf shaping, never CDP throttling.- Audio: verify the 64/128/256 kbps Share settings, negotiated/observed bitrate, audible music quality, route changes, and game A/V synchronization. Bitrate settings are ceilings, not quality proof.-- Observability: the v9 Viewer stage, local stats/export plumbing, identity-bound relayed-detail retention, export freshness guards, and on-demand Host route snapshot are deployed. Target-browser availability and actual values remain unverified for Host SFU sender evidence, codec/fmtp and encoder implementation/power efficiency, media-source and encoded FPS, A/V playout/jitter/concealment, selected candidate endpoints, and bounded same-pair STUN-response observation. All fields diagnose and have no recovery authority; they do not by themselves prove hardware encode, synchronization quality, or route quality.+- Observability: the v10 Viewer stage, local stats/export plumbing, identity-bound relayed-detail retention, export freshness guards, and on-demand Host route snapshot are deployed. Target-browser availability and actual values remain unverified for Host SFU sender evidence, codec/fmtp and encoder implementation/power efficiency, media-source and encoded FPS, A/V playout/jitter/concealment, selected candidate endpoints, and bounded same-pair STUN-response observation. All fields diagnose and have no recovery authority; they do not by themselves prove hardware encode, synchronization quality, or route quality.- Mobile: Android/iOS remain Viewer-only. Autoplay, rotation, iOS lock-screen/page reclamation, background reconnection, and network changes need device evidence. AirPlay/system mirroring is Viewer-local output, not a portable in-app WebRTC output contract.- Native: ADR-0006 has one-Viewer evidence only. Viewer2/FIFO, hardware diversity, endurance, downloaded-package/public-host, game A/V, and browser diversity remain open.-- Access and operations: exact v9 source passed the access/privacy Browser gate, and production passed atomic v9 cutover/postflight plus stale-v8 rejection before authority. Restart-wide room loss, password-profile creation, grant/code orthogonality, rotate/revoke, memory-only runtime, and exact current journal/nginx sentinel checks retain their focused evidence. Headful same-browser preference replay and the isolated VM/IP clean-port matrix remain open; shared-IP smoke cannot approve them.+- Access and operations: exact v10 source passed the access/privacy Browser gate, and production passed atomic v10 cutover/postflight plus stale-v9 rejection before authority. Restart-wide room loss, password-profile creation, grant/code orthogonality, rotate/revoke, memory-only runtime, and exact current journal/nginx sentinel checks retain their focused evidence. Headful same-browser preference replay and the isolated VM/IP clean-port matrix remain open; shared-IP smoke cannot approve them.## Evidence Rulesdiff --git "a/docs/\346\226\271\346\241\210\350\256\276\350\256\241.md" "b/docs/\346\226\271\346\241\210\350\256\276\350\256\241.md"index 7072a313..dd29e33e 100644--- "a/docs/\346\226\271\346\241\210\350\256\276\350\256\241.md"+++ "b/docs/\346\226\271\346\241\210\350\256\276\350\256\241.md"@@ -2,7 +2,7 @@## 2026-08-18 14:45-状态:Current source 使用单一 `screener-v10` Browser wire,默认 VP8,codec selector 仅在分享前用于诊断且结果在 share lifetime 内固定;Pause/Resume 由当前 Host session 和 `shareGeneration` 约束。Production 仍为 exact `39fcf93bae057fcbb1002702c3be6b90bac9027f`、release `39fcf93`、wire `screener-v9`。精确 deployed behavior 只由 deployment 文档记录。+状态:Current source 与 production 使用单一 `screener-v10` Browser wire,默认 VP8,codec selector 仅在分享前用于诊断且结果在 share lifetime 内固定;Pause/Resume 由当前 Host session 和 `shareGeneration` 约束。精确 deployed behavior 只由 deployment 文档记录。## 目标与边界@@ -74,7 +74,7 @@ tests/ RoomStore、ICE 配置、协议和 WebSocket 集成测试WebSocket upgrade 无法预知后续 role,因此仍允许没有 site-access cookie 的合法 grant Viewer 完成握手;握手前严格校验 `/signal` 无 query、Origin allowlist、总连接数和未鉴权连接数,并把当次 cookie 校验结果保存到 socket state。五秒内的第一条 `authenticate` 完成授权:Host 必须同时拥有 upgrade 时有效的 site-access 状态和当前房间 `hostToken`;Viewer 必须拥有目标房间合法未过期 grant,或者先通过 site access 再按 `open | password | disabled` code-only policy 校验。site-access cookie 只允许进行 code-only 尝试,不能替代 grant/房间密码;Viewer grant 也不能用于 HTTP 建房、Host role、其他房间或其他操作。-Viewer grant 与 code-only 入口是两个正交维度。每个房间都用 `randomBytes(32)` 生成含 256-bit 随机量和到期时间的 room-scoped opaque grant,服务端只在内存保存完整 grant 的 SHA-256 摘要并用定长比较验证。Host 的主分享动作始终复制 token-bearing invitation;到期在以后鉴权/重连时拒绝,即时清退使用 rotate/revoke。+Viewer grant 与 code-only 入口是两个正交维度。每个房间都用 `randomBytes(32)` 生成含 256-bit 随机量和到期时间的 room-scoped opaque grant,服务端只在内存保存完整 grant 的 SHA-256 摘要并用定长比较验证。当前 grant 从建房或 rotate 起固定有效七天;房间删除、进程重启或 revoke 会使它更早失效。Host 的主分享动作始终复制 token-bearing invitation;到期在以后鉴权/重连时拒绝,即时清退使用 rotate/revoke。code-only policy 使用单一 `open | password | disabled` 状态:`open` 是无房间密码的默认值;`password` 要求已通过 site access 的 Viewer 再输入该房间密码;`disabled` 中性拒绝 code-only 尝试。它们都不改变有效 grant 的 exact-room Viewer authority,也不建立目录、账号、ACL 或额外媒体容量。Host 可独立改变 code-only policy、设置/替换/移除密码,以及 rotate/revoke grant。@@ -359,7 +359,7 @@ Token-free SFU standby prewarm 保持可选且不创建 participant、publicatio## 当前交付边界-- Current source 使用单一 `screener-v10` wire,默认 VP8,codec selector 只在分享前可用且对本次分享固定,Pause/Resume 由当前 Host session 和 `shareGeneration` 约束。Production 仍运行 exact `39fcf93bae057fcbb1002702c3be6b90bac9027f`、release `39fcf93`、wire `screener-v9`,回滚边界为 `/opt/screener/backups/39fcf93-pre-v9-20260824T004257Z`。v10 以 server 与 Browser assets 原子部署并在 room authority 前校验 wire version。+- Current source 与 production 使用单一 `screener-v10` wire,默认 VP8,codec selector 只在分享前可用且对本次分享固定,Pause/Resume 由当前 Host session 和 `shareGeneration` 约束。- 物理 direct 证据选定最终固定 Browser codec;若选择 H.264,再由 browser relay 与 SFU 验证。Host 后台性能按受控根因证据诊断;标准 ICE/SFU 按真实异构网络验收。- 当前发布面只包含 Web Host、Viewer 和 browser relay。Native sender、capture helper、shared-encode executable 与两个分发包仍由各自后续决策和物理证据驱动,不属于当前 Browser release。diff --git "a/docs/\351\234\200\346\261\202\347\220\206\350\247\243.md" "b/docs/\351\234\200\346\261\202\347\220\206\350\247\243.md"index deb5b3fc..c92a7d8b 100644--- "a/docs/\351\234\200\346\261\202\347\220\206\350\247\243.md"+++ "b/docs/\351\234\200\346\261\202\347\220\206\350\247\243.md"@@ -133,7 +133,7 @@ SFU 的 publication、subscription、server-resource accounting、临时 overlap### 一对多与带宽保护-- Given `ENDPOINT_MEDIA_COPY_CAPACITY=C`,其中 `C` 只能是 `1`、`2` 或 `3` 且默认 `2`,When Browser Host 或任一 Browser Viewer 建立、恢复、重鉴权或迁移媒体路径,Then peer child 与 Host publication 的稳态实际发送副本总数不超过 `C`,upstream receive 不计数,角色、浏览器和 UA 不改变 `C`;每个 `authenticated` 快照都携带同一个 `C`,并行候选只有持有 `TransitionOverlapSlot` 时才可达到 `min(C + 1, 3)`,并在 commit/abort 后释放。When `screener-v10` 房间合同上线,Then server 与 Browser assets 在同一 release 原子升级,缺失或越界的 `C`、v9/其他旧 wire 与 executable sender 都在房间授权前得到明确 mismatch,且 `C=3` 满载 Host 在取得会产生第四份 endpoint media copy 的 publication/token 前明确等待或失败。+- Given `ENDPOINT_MEDIA_COPY_CAPACITY=C`,其中 `C` 只能是 `1`、`2` 或 `3` 且默认 `2`,When Browser Host 或任一 Browser Viewer 建立、恢复、重鉴权或迁移媒体路径,Then peer child 与 Host publication 的稳态实际发送副本总数不超过 `C`,upstream receive 不计数,角色、浏览器和 UA 不改变 `C`;每个 `authenticated` 快照都携带同一个 `C`,并行候选只有持有 `TransitionOverlapSlot` 时才可达到 `min(C + 1, 3)`,并在 commit/abort 后释放。Given 当前 `screener-v10` 房间合同,When Host 或 Viewer 取得房间 authority,Then server 与 Browser assets 属于同一 release,缺失或越界的 `C`、其他 wire 与 executable sender 得到明确 mismatch,且 `C=3` 满载 Host 在取得会产生第四份 endpoint media copy 的 publication/token 前明确等待或失败。- Given peer-assisted 路径分别运行 1、5、10、20 名观看者,When 用户加入、容量释放、节点离开、重鉴权或当前 edge 失效,Then 服务端只为新 Viewer、等待 Viewer 或失去 parent 的 subtree root 选择一个 active parent;每名 Viewer 同时至多一个 active upstream,活动图无环,其余健康边保持 sticky。没有可用 parent 时明确等待或拒绝,不主动重平衡或引入常驻多源媒体。- Given 一个 Host root 退出并释放 Host sender slot,When 新 Viewer 加入或一个失父 child 进入同一 reconcile,Then 候选按结果深度优先,选择 Host 而不是另一 root 的更深空槽;已健康挂在另一 root 下的旧 child 不被周期性搬动。Given authenticated Host 点击下载诊断,Then 服务端按需生成一份 current route snapshot,用 snapshot-local opaque ordinal 表达当前 parent 关系,并只包含 current operation reason/stage/cursor、每个 current child 的 latest demand/queue/candidate/first-frame timing 与封闭 outcome enum;该 ordinal 不是稳定身份,snapshot 不反推丢失事件、不记录 planner 过滤过的 parent、不包含 raw identity/address/error,也不参与 route。Given Viewer 请求房间级 snapshot,Then 服务端拒绝。- Given 一名分享者和 20 名观看者,When 运行 bounded browser smoke,Then 全部 Viewer 取得明确媒体或 bounded wait/failure,非服务器端点不超过 `C`,并记录 route depth、首帧时间、实际 sender 数、应用服务器 CPU/内存以及 SFU 用量。诊断汇总报告 20 个 current-child 样本数、pending 数、每项原始排序时长和 nearest-rank p50/p95/max,不设通过阈值;confirmed departure 和 room delete 后对应 timing 必须消失。该 smoke 验证 admission、控制面效能和资源上界,不单独证明任意公网画质或 30 分钟 endurance。