Skip to content

armgit / Piik

Public Imported from GitHub
0

Free, open-source screen sharing for private live streams with friends. Watch together in a browser or self-host Piik. 免费开源的私密屏幕共享,支持游戏直播、一起看电影与自部署。

docs: checkpoint audio route verification (#246)

AAA30594107f0ee
diff --git a/docs/adr/0002-memory-resident-protected-rooms.md b/docs/adr/0002-memory-resident-protected-rooms.md
index 7d5ae30b..f4c7b67e 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 and deployed in exact release `2d5818c` on strict v12
+- Status: Accepted and deployed in exact release `bf32859` on strict v12
- Date: 2026-08-23
## Context
@@ -174,7 +174,7 @@ Current source and production use the strict `screener-v12` wire and implement t
22-character room-incarnation grant, exact digest validation, rotate/revoke,
browser-storage privacy, `open | private` code entry, and the `ROOM_NOT_FOUND`
split without a v11 parser. Production is exact deployed revision
-`2d5818ccf57f8ccf0999160ea74a16c9b4d97d12`, release `2d5818c`.
+`bf328590b3de5dfa509fcc70f6316286af3eae7e`, release `bf32859`.
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.md
index 42b46eeb..ecfbb7a4 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: The route model is accepted and deployed in exact release `2d5818c`
+- Status: The route model is accepted and deployed in exact release `bf32859`
on strict v12, including Browser SFU ICE-server isolation, no product
diagnostic-download UI, and the retained Host-only acceptance snapshot.
- Date: 2026-08-20
@@ -362,7 +362,7 @@ deployment-wide.
## Current Source And Deployment Boundary
Production runs exact deployed application/runtime revision
-`2d5818ccf57f8ccf0999160ea74a16c9b4d97d12`, release `2d5818c`; canonical `main`
+`bf328590b3de5dfa509fcc70f6316286af3eae7e`, release `bf32859`; canonical `main`
contains the same application/runtime tree plus the current truth checkpoint, including exact
Browser SFU ICE-server-isolation implementation
`ae09c760adec76fd26da611d4928486d105c6d3b`. Both run strict `screener-v12` and
diff --git a/docs/deployment.md b/docs/deployment.md
index 5c6335cf..79ca9331 100644
--- a/docs/deployment.md
+++ b/docs/deployment.md
@@ -3,7 +3,7 @@
Last verified against upstream documentation: 2026-08-24.
This page records production running exact deployed application/runtime revision
-`2d5818ccf57f8ccf0999160ea74a16c9b4d97d12`, release `2d5818c`, and the single
+`bf328590b3de5dfa509fcc70f6316286af3eae7e`, release `bf32859`, and the single
Browser `screener-v12` contract. Product direction and pending work are owned by
[project memory](./project-memory.md) and [the TODO ledger](./todo.md).
@@ -25,16 +25,16 @@ ICE/UDP only. Ordinary peer ICE remains STUN-only and production coturn uses the
tracked STUN-only configuration with TCP/TLS disabled. The source and production
configure no TURN, ICE/TCP, media TCP, or TLS-relayed media.
-Production runs exact `2d5818ccf57f8ccf0999160ea74a16c9b4d97d12`, release
-`2d5818c`, from `/opt/screener/releases/2d5818c`. The immutable runtime ZIP
+Production runs exact `bf328590b3de5dfa509fcc70f6316286af3eae7e`, release
+`bf32859`, from `/opt/screener/releases/bf32859`. The immutable runtime ZIP
SHA-256 is
-`a2e4c6b3bdf062103cd09b75c7de072eedcb8f311264070f57fbb0dfcf2bf315`.
+`e8b8fccf0ab15591af5e6675ca9236bae28b648dccfa8b1ea208a79b927168be`.
Its 38-file path/size/hash manifest SHA-256 is
-`eb118c51759e087bb81b530c7d765fd862220227d5f70bcf807628b61155b5f4`.
+`d1c6b7c025e37711c0d06f5ec222a6fba26391d2e34a06b374deb1a05ddd63c6`.
Local and public `/healthz` return 200; Screener, LiveKit, coturn, and nginx are
active with `NRestarts=0`. The public main Browser asset is
-`assets/index-CgT-8Ltd.js` with SHA-256
-`f04c6ed8e963694a584b0e7de4bbf44820a7be1da10360a3ae99fb36149fb6be`.
+`assets/index-BmWh33Cv.js` with SHA-256
+`e0400b1d5a5017bf5851158f5a884425aaca0269c5e3efa4cc521f3580c19bce`.
The release deploys the single Browser `screener-v12` wire, fixed VP8 for Browser
direct, browser-relay, and SFU video, no video `contentHint`, no codec UI/state/wire,
@@ -271,7 +271,7 @@ lifetime. An actively connected Host prevents expiry; explicit stop or Host
disconnect starts the lease, and only the exact Host token renews it before
expiry. Viewer activity never renews ownership. `ROOM_DATABASE_PATH` and
`ROOM_TTL_SECONDS` fail startup even when blank.
-Production `2d5818c` accepts 1 through 20 and explicitly selects 20. This is an
+Production `bf32859` accepts 1 through 20 and explicitly selects 20. This is an
admission limit, not evidence that every publisher, network, or quality profile
can sustain that many streams.
`ENDPOINT_MEDIA_COPY_CAPACITY` defaults to 2 and accepts only 1, 2, or 3. It is
@@ -284,7 +284,7 @@ must fail or wait before a fourth endpoint copy is issued.
Supplying the removed `MAX_PEER_RELAY_DOWNSTREAM_EDGES`, even blank, fails
startup.
-Production release `2d5818c` runs the deployed server and Browser assets
+Production release `bf32859` runs the deployed server and Browser assets
atomically on `screener-v12`; every stale Browser or executable-sender wire fails
before room authority. Native senders and helpers are outside this release.
diff --git a/docs/project-memory.md b/docs/project-memory.md
index 4e01c5f9..70431081 100644
--- a/docs/project-memory.md
+++ b/docs/project-memory.md
@@ -28,19 +28,19 @@ Last updated: 2026-08-25
## Current Source And Production
-- Production runs exact application/runtime revision `2d5818ccf57f8ccf0999160ea74a16c9b4d97d12`, release `2d5818c`, on strict `screener-v12`; canonical `main` contains the same application/runtime tree plus the current truth checkpoint.
+- Production runs exact application/runtime revision `bf328590b3de5dfa509fcc70f6316286af3eae7e`, release `bf32859`, on strict `screener-v12`; canonical `main` contains the same application/runtime tree plus the current truth checkpoint.
- 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. Browser SFU publisher/subscriber connects use fresh empty ICE-server options; the owner physically verified deployed SFU fallback media after release `c4962f5`, closing the prior core-route hold.
- Source and production use random four-digit memory rooms, dormant leases, exact-Host resume, restart loss, local preference replay, orthogonal grants/code entry, and no SQLite runtime. V12 uses a 22-character room-incarnation grant, `ROOM_NOT_FOUND`, no diagnostic-file export, and a compact UI showing the complete shorter URL.
- Exact production artifacts, services, ports, and any change-scoped infrastructure recovery boundary are owned by [deployment](./deployment.md) and indexed by [status](./status.md).
-- Source and production require v12, fix Browser direct, browser-relay, and SFU media to VP8, leave video `contentHint` unset, and contain no codec UI, quality state, wire field, fallback media codec, or share-lifetime codec branch. They use `shareGeneration`-fenced Pause/Resume, implement live 64/128/256 kbps audio-ceiling mutation, bind Host and SFU publisher audio metrics to the exact current sender track, keep typed first-frame Viewer presentation, and expose exactly three recommended profiles with `1080p30` as default plus advanced-only `854x480`.
+- Source and production require v12, fix Browser direct, browser-relay, and SFU media to VP8, leave video `contentHint` unset, and contain no codec UI, quality state, wire field, fallback media codec, or share-lifetime codec branch. They use `shareGeneration`-fenced Pause/Resume, implement live 64/128/256 kbps audio-ceiling mutation, bind Host and SFU publisher audio metrics to the exact current sender, reconcile relay audio-track changes on the persistent stream, and reacquire exact SFU publications/senders across reconnect. They keep typed first-frame Viewer presentation and expose exactly three recommended profiles with `1080p30` as default plus 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 `main@2d5818c` passed TypeScript, 608 Web tests in 44 files, both builds, repository hygiene, focused review, and production artifact/service postflight. The SFU, access/privacy, 20-Viewer, responsive visual, and physical SFU evidence stays bounded to its exact predecessor revisions.
+- Exact `main@bf32859` passed TypeScript, 613 Web tests in 44 files, both builds, repository hygiene, focused review, and production artifact/service postflight. Its Chrome 151 physical audio gate covered direct, browser-relay, SFU, all three sender ceilings, and source replacement; SFU A/V playout timestamps remained unavailable, so real-game synchronization stays in route acceptance.
- 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. Physically validate the corrected `1 kbps` audio observation and live audio ceilings with audible content across direct, browser-relay, and SFU paths.
-2. Then physically validate exact direct, browser-relay, and SFU codec behavior on the deployed Browser release and finish real-network route acceptance. Browser VP8 hardware acceleration and mobile Viewer lifecycle remain Accepted Later; Native/executable, distribution, and repository-wide simplification remain later phases.
+1. Diagnose the reported localhost `1080p60` shortfall and physically validate exact direct, browser-relay, and SFU VP8/no-video-hint behavior on the deployed Browser release.
+2. Then finish real-network route, recovery, screen-audio and real-game A/V acceptance. Browser VP8 hardware acceleration and mobile Viewer lifecycle remain Accepted Later; Native/executable, distribution, and repository-wide simplification remain later phases.
The desktop Host background/minimized report is deferred until it reproduces on current production with a real game and synchronized media plus CPU/GPU evidence. The bounded current-Chrome screening found no immediate Host-page lifecycle drop, and removal of the old harmful `contentHint = "motion"` remains a plausible confound rather than a proven background fix. Mobile Viewer playback and assigned-relay survival remain a separate lifecycle gate.
diff --git a/docs/research/browser-screen-audio-quality.md b/docs/research/browser-screen-audio-quality.md
index a2d65935..68e6f3b7 100644
--- a/docs/research/browser-screen-audio-quality.md
+++ b/docs/research/browser-screen-audio-quality.md
@@ -1,39 +1,37 @@
# Browser Screen-Audio Quality Controls
-Accessed: 2026-08-22
-
-Status: peer and SFU routes already use stereo and a 128 kbps default, but users
-still report speech-gated movie/game audio, including on a phone connected
-directly through the SFU. Current Chromium web `getDisplayMedia()` defaults to
-local speech processing unless the request disables it. The source request is
-explicit. Production runs exact deployed application/runtime revision
-`c4962f54443ad5f98bc65861195a3d9c74a48996`, release `c4962f5`; canonical
-`main` contains the same runtime code. Current Browser source and production use
-strict `screener-v11`, fixed VP8, no video hint, and no codec UI, quality state,
-or wire field. They expose bounded 64/128/256 kbps choices,
-apply them to new P2P, browser-relay, and SFU senders, and implement serialized
-live mutation with applied readback.
-Target-device audible proof remains open.
+Accessed: 2026-08-25
+
+Status: current Browser source and production use strict `screener-v12`, fixed
+VP8, no video hint, and one Opus screen-audio path with bounded 64/128/256 kbps
+sender ceilings. Production runs exact application/runtime revision
+`bf328590b3de5dfa509fcc70f6316286af3eae7e`, release `bf32859`; canonical
+`main` contains the same runtime code. The capture request disables local speech
+processing, live mutation has applied readback, relay track changes preserve the
+persistent stream, and SFU reconnect reacquires exact publications/senders.
+Current-production physical evidence closes the active-source `1 kbps` report;
+audible game quality and real-game SFU A/V synchronization remain open.
## Observed-Bitrate Identity Boundary
-The reported Host audio diagnostic remaining at `1 kbps` after a source switch
-is not explained by a unit conversion or a configured ceiling. The existing
-delta calculation `(bytes * 8) / milliseconds` already returns kbps, and the UI
-only rounds that observed value. A muted or idle Opus stream can produce a value
-around 1 kbps, but the cause of the reported live-source value remains unproven
-until physical reproduction.
-
-The current source nevertheless has two exact-observation defects. Ordinary
-peer stats select video by the current track identity but do not explicitly bind
-the selected audio RTP record to the current audio track. The SFU publisher
-requests stats only from the video sender even though
-`RTCRtpSender.getStats()` is scoped to that sender. The accepted fix reuses the
-existing exact media selector and report merge: ordinary Host and SFU publisher
-audio metrics bind to the current audio sender track, explicit no-audio returns
-unknown, video and audio sender reports are merged for SFU, and an audio-track
-identity change resets the interval baseline. It does not multiply the observed
-value, substitute the 64/128/256 kbps ceiling, or add an inferred audio state.
+The interval calculation `(bytes * 8) / milliseconds` already returns kbps, and
+the UI rounds that observed value rather than displaying a configured ceiling.
+Current source binds ordinary and SFU publisher stats to the exact active audio
+sender, merges the SFU sender reports, resets identity-changing baselines, keeps
+late relay audio changes on exact children, and reacquires exact SFU senders on
+reconnect. Explicit no-audio remains unknown.
+
+A Chrome 151 gate against exact production `bf32859` used real
+`getDisplayMedia()` with generated active audio. Two Host-direct children, one
+browser-relay child and one SFU Viewer all advanced audio energy and video frames
+at each ceiling and after source replacement; the active UI never remained at
+`1 kbps`. Direct/browser-relay traffic tracked the selected ceiling. SFU wire
+traffic exceeded the 64/128 ceilings because the accepted pinned LiveKit
+publication retains RED; this does not change the exact sender parameter
+readback. Ordinary-route audio-minus-video playout timestamps ranged from -101
+to +4 ms once RTCP mapping arrived. Chrome exposed no such field on the SFU
+subscription, which remains unknown rather than zero or inferred. A muted or
+idle Opus stream may still legitimately use about 1 kbps.
## Scope And Decision
@@ -514,6 +512,7 @@ be copied into Screener's screen-media path.
- [Chromium web display-audio constraint selection](https://github.com/chromium/chromium/blob/3620c35de32f20cfb11d0a616227c44750e31c67/third_party/blink/renderer/modules/mediastream/media_stream_constraints_util_audio.cc)
- [Chromium M142 display-audio default restoration](https://chromium.googlesource.com/chromium/src/+/b059fa325c6da901f1b0b6afd9e736d67f62960e)
- [Chromium display-capture audio processing](https://github.com/chromium/chromium/blob/0d07b03783490c156526384073fb5e97e7463e77/third_party/blink/renderer/modules/mediastream/media_stream_audio_processing_layout.cc)
+- [libwebrtc stats collector](https://webrtc.googlesource.com/src/+/refs/heads/main/pc/rtc_stats_collector.cc)
- [LiveKit 2.22.0 track options](https://github.com/livekit/client-sdk-js/blob/v2.22.0/src/room/track/options.ts)
- [LiveKit 2.22.0 publish defaults](https://github.com/livekit/client-sdk-js/blob/v2.22.0/src/room/defaults.ts)
- [LiveKit 2.22.0 local publication](https://github.com/livekit/client-sdk-js/blob/v2.22.0/src/room/participant/LocalParticipant.ts)
diff --git a/docs/session-handoff.md b/docs/session-handoff.md
index 760544e2..d468d417 100644
--- a/docs/session-handoff.md
+++ b/docs/session-handoff.md
@@ -36,8 +36,8 @@ Current high-signal boundary:
subscriber PCs explicitly use no external ICE server and check the dedicated
public SFU candidate directly; ordinary peers and LiveKit server-side public
IP discovery retain deployment STUN. Production exact deployed
- application/runtime revision `2d5818ccf57f8ccf0999160ea74a16c9b4d97d12`,
- release `2d5818c`, uses strict `screener-v12` and includes exact Browser SFU
+ application/runtime revision `bf328590b3de5dfa509fcc70f6316286af3eae7e`,
+ release `bf32859`, uses strict `screener-v12` and includes exact Browser SFU
ICE-server-isolation implementation
`ae09c760adec76fd26da611d4928486d105c6d3b`. Owner physical SFU fallback proof
remains bounded to predecessor release `c4962f5`. The route uses one short-lived
@@ -53,8 +53,9 @@ Current high-signal boundary:
- Browser display video must leave `contentHint` unset; audio keeps `music`.
Browser video is fixed VP8 across direct, browser-relay, and SFU paths; strict
v12 source and production have no codec UI/state/wire or fallback media codec.
- Automated source gates and the exact deployment postflight passed,
- but no physical direct, browser-relay, or SFU codec path has been verified.
+ Automated source gates and the exact deployment postflight passed. Chrome 151
+ physically verified direct/browser-relay/SFU screen-audio continuity and all
+ three sender ceilings; the separate VP8 performance/codec gate remains open.
- Ordinary browser ICE owns direct reachability. Do not build port prediction,
guessed candidates, NAT classification, TCP probes, quality scores, or
quality-driven reparenting. Current-path quality is diagnostic; a healthy
diff --git a/docs/status.md b/docs/status.md
index 1fd688a8..3adee6cb 100644
--- a/docs/status.md
+++ b/docs/status.md
@@ -6,9 +6,9 @@ This is the current execution index. Git history owns completed timelines; [veri
## Production
-- `https://share.bonfire.icu` runs exact deployed application/runtime revision `2d5818ccf57f8ccf0999160ea74a16c9b4d97d12`, release `2d5818c`, wire `screener-v12`, from `/opt/screener/releases/2d5818c`; that revision is integrated in canonical `main`. Its immutable runtime ZIP SHA-256 is `a2e4c6b3bdf062103cd09b75c7de072eedcb8f311264070f57fbb0dfcf2bf315`, and its 38-file manifest SHA-256 is `eb118c51759e087bb81b530c7d765fd862220227d5f70bcf807628b61155b5f4`.
-- `screener`, LiveKit, coturn, and nginx are active/running; local/public `/healthz` return 200, all six served Browser files match the immutable release, and all four services report `NRestarts=0`. The main Browser asset is `assets/index-CgT-8Ltd.js` with SHA-256 `f04c6ed8e963694a584b0e7de4bbf44820a7be1da10360a3ae99fb36149fb6be`; the prior asset returns 404.
-- The service process resolves its working directory to exact release `2d5818c`; it has no writable room `StateDirectory` or SQLite runtime.
+- `https://share.bonfire.icu` runs exact deployed application/runtime revision `bf328590b3de5dfa509fcc70f6316286af3eae7e`, release `bf32859`, wire `screener-v12`, from `/opt/screener/releases/bf32859`; that revision is integrated in canonical `main`. Its immutable runtime ZIP SHA-256 is `e8b8fccf0ab15591af5e6675ca9236bae28b648dccfa8b1ea208a79b927168be`, and its 38-file manifest SHA-256 is `d1c6b7c025e37711c0d06f5ec222a6fba26391d2e34a06b374deb1a05ddd63c6`.
+- `screener`, LiveKit, coturn, and nginx are active/running; local/public `/healthz` and the served Browser asset match the immutable release, and all four services report `NRestarts=0`. The main Browser asset is `assets/index-BmWh33Cv.js` with SHA-256 `e0400b1d5a5017bf5851158f5a884425aaca0269c5e3efa4cc521f3580c19bce`; the prior asset returns 404.
+- The service process resolves its working directory to exact release `bf32859`; 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, a room-lived 22-character Viewer grant, and exactly `open | private` code entry. Private rooms without a password are invitation-only; configuring one additionally permits matching code-and-password entry. LiveKit remains dedicated with `room.auto_create: false`, `max_participants: 21`, and global admission `1` publication ingress / `20` subscription egress.
- Production media ports remain STUN-only UDP 3478 and LiveKit UDP 7882; coturn TCP/TLS, port 5349, media TCP, and relay ranges are disabled. The public Web ingress remains TCP 80/443; Node 8787 and LiveKit control/signaling 7880 are internal-only. The stable `inet bonfire_filter` table SHA-256 is `afaf9d066e9f292d8bd19032b38c0978ccf60dd01c2fe7f210968ff751f90534`; the dynamic fail2ban table is excluded from that identity.
- 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. The current postflight found healthy unchanged services; owner physical SFU fallback proof remains bounded to exact predecessor release `c4962f5`. Full current-release direct/browser-relay/SFU codec and real-network acceptance remain open.
@@ -22,16 +22,15 @@ This is the current execution index. Git history owns completed timelines; [veri
- 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.
- Current Browser SFU publisher and subscriber connects supply fresh `autoSubscribe: false` plus `rtcConfig: { iceServers: [] }` options. Ordinary peers retain deployment STUN; LiveKit signaling candidates, server-side public-IP discovery, route deadlines, ports, and retry behavior are unchanged.
-- Current source leaves video `contentHint` unset and keeps audio `contentHint = "music"`. Browser direct and browser-relay offers contain VP8 as their only media codec, and SFU publication explicitly uses VP8 with no backup codec. Codec UI, quality state, wire fields, fallback media codecs, and share-lifetime codec branches are absent. Live 64/128/256 kbps audio-ceiling mutation remains unchanged; ordinary Host and SFU publisher metrics now select the exact current audio sender track and reset their baseline when that identity changes or disappears.
+- Current source leaves video `contentHint` unset and keeps audio `contentHint = "music"`. Browser direct and browser-relay offers contain VP8 as their only media codec, and SFU publication explicitly uses VP8 with no backup codec. Codec UI, quality state, wire fields, fallback media codecs, and share-lifetime codec branches are absent. Live 64/128/256 kbps audio-ceiling mutation remains unchanged; ordinary Host and SFU publisher metrics select the exact current audio sender, relays reconcile audio-track additions and removals on the persistent stream, and an SFU reconnect reacquires the current publication/sender or fails the route closed.
- Current source implements typed first-frame Viewer presentation and recovery, Chinese user-facing route/access failures, local connection details without a diagnostic-file export, authenticated Host-only on-demand route snapshots for automatic acceptance, explicit missing-room presentation, and responsive entry controls. Host invitation controls remain independent from two-state room-code entry.
- Recommended quality remains exactly `1080p60`, `1080p30`, and `720p30`; current source defaults to `1080p30`. Advanced resolution adds `480p` as `854x480` without adding a fourth preset, and advanced FPS and bitrate remain independent.
-- Exact `main@2d5818c` passed repository hygiene, TypeScript, all 608 Web tests in 44 files, both production builds, focused independent review, and the production artifact/service postflight above. The predecessor SFU gate, access/privacy gate, 20-Viewer loopback, responsive visual, and physical SFU evidence remain separately revision-bounded in [verification status](./verification-status.md).
+- Exact `main@bf32859` passed repository hygiene, TypeScript, all 613 Web tests in 44 files, both production builds, focused independent review, and the production artifact/service postflight above. A Chrome 151 production gate then exercised two direct children, one browser-relay child, one SFU subscription, all three audio ceilings, and live source replacement with progressing audio/video; exact evidence boundaries remain in [verification status](./verification-status.md).
## Current Milestone
-1. Physically validate the corrected live screen-audio statistics and 64/128/256 kbps ceilings with known audible content across direct, browser-relay, and SFU paths.
-2. Physically verify fixed-VP8/no-video-hint direct, browser-relay, and SFU paths from actual codec, capture, outbound, and decoded stats.
-3. 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.
+1. Physically diagnose the reported localhost `1080p60` shortfall and verify fixed-VP8/no-video-hint direct, browser-relay, and SFU paths from actual capture, encode, send, receive, decode, render, codec, and resource evidence.
+2. Finish representative ICE/STUN/SFU acceptance, including route recovery, screen-audio continuity and real-game A/V sync on mobile and heterogeneous networks. Browser port prediction, NAT classification, TCP probing, fake page keepalive, and quality-driven reparenting remain outside the accepted model.
## Active Boundaries
diff --git a/docs/todo.md b/docs/todo.md
index 5930053c..9588c884 100644
--- a/docs/todo.md
+++ b/docs/todo.md
@@ -6,9 +6,8 @@ Only items in **Now** are executable after their stated decision gate. A branch
## Now
-1. **Physically validate live screen-audio statistics.** The deployed source binds ordinary Host and SFU publisher audio stats to the exact current sender track, merges SFU video/audio reports, and resets the baseline when audio identity changes or disappears. Reproduce the reported `1 kbps` state with known audible content and switch the 64/128/256 kbps ceilings across direct, browser-relay, and SFU paths while checking sender/receiver counters, route continuity, audible result, and A/V synchronization. A real muted/idle track may legitimately use about 1 kbps; do not multiply the value or display the configured ceiling as observed bitrate.
-2. **Diagnose and physically validate Browser VP8 performance with no video hint.** First reproduce the reported localhost `1080p60` shortfall with current production and separate source capture, encoded, sent, received, decoded, and rendered frame rates plus encode time, quality limitation, CPU/GPU load, and actual encoder implementation. Compare `contentHint` only as a controlled diagnostic and do not restore it by assumption. Then confirm actual VP8 codec, capture, outbound, and decoded stats on direct, browser-relay, and SFU paths; automated gates and the predecessor SFU connectivity proof do not close this performance/codec gate.
-3. **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.
+1. **Diagnose and physically validate Browser VP8 performance with no video hint.** First reproduce the reported localhost `1080p60` shortfall with current production and separate source capture, encoded, sent, received, decoded, and rendered frame rates plus encode time, quality limitation, CPU/GPU load, and actual encoder implementation. Compare `contentHint` only as a controlled diagnostic and do not restore it by assumption. Then confirm actual VP8 codec, capture, outbound, and decoded stats on direct, browser-relay, and SFU paths; automated gates and the predecessor SFU connectivity proof do not close this performance/codec gate.
+2. **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, screen-audio continuity and real-game A/V sync, 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.
## Accepted Later Roadmap
diff --git a/docs/verification-status.md b/docs/verification-status.md
index d0874ca3..9cae65ea 100644
--- a/docs/verification-status.md
+++ b/docs/verification-status.md
@@ -10,15 +10,16 @@ Capacity and routing entries below describe the exact tested source or release o
## Deployment Evidence
-- Production runs exact deployed application/runtime revision `2d5818ccf57f8ccf0999160ea74a16c9b4d97d12`, release `2d5818c`, wire `screener-v12`, from `/opt/screener/releases/2d5818c`; that revision is integrated in canonical `main`. The immutable runtime ZIP SHA-256 is `a2e4c6b3bdf062103cd09b75c7de072eedcb8f311264070f57fbb0dfcf2bf315`; its 38-file manifest SHA-256 is `eb118c51759e087bb81b530c7d765fd862220227d5f70bcf807628b61155b5f4`.
-- Postflight found `screener`, LiveKit, coturn, and nginx active with zero restarts and no warning-level Screener journal entries. Local/public health and all six served Browser files matched the release; `assets/index-CgT-8Ltd.js` has SHA-256 `f04c6ed8e963694a584b0e7de4bbf44820a7be1da10360a3ae99fb36149fb6be`, while the prior main asset returns 404.
+- Production runs exact deployed application/runtime revision `bf328590b3de5dfa509fcc70f6316286af3eae7e`, release `bf32859`, wire `screener-v12`, from `/opt/screener/releases/bf32859`; that revision is integrated in canonical `main`. The immutable runtime ZIP SHA-256 is `e8b8fccf0ab15591af5e6675ca9236bae28b648dccfa8b1ea208a79b927168be`; its 38-file manifest SHA-256 is `d1c6b7c025e37711c0d06f5ec222a6fba26391d2e34a06b374deb1a05ddd63c6`.
+- Postflight found `screener`, LiveKit, coturn, and nginx active with zero restarts and no warning-level Screener journal entries. Local/public health and the served main Browser asset matched the release; `assets/index-BmWh33Cv.js` has SHA-256 `e0400b1d5a5017bf5851158f5a884425aaca0269c5e3efa4cc521f3580c19bce`, while the prior main asset returns 404.
- 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. Media listeners remain STUN-only UDP 3478 and LiveKit UDP 7882 with no 5349, coturn TCP/TLS, relay range, ICE/TCP, or media TCP listener. The stable `inet bonfire_filter` table stayed unchanged through cutover at SHA-256 `afaf9d066e9f292d8bd19032b38c0978ccf60dd01c2fe7f210968ff751f90534`; the whole ruleset is not used as an identity because fail2ban owns a dynamic address set.
- This application-only postflight proves archive identity, atomic application/assets, process health, and listener/firewall continuity. It did not re-exercise access, stale-wire rejection, direct, browser-relay, SFU, audio, codec, mobile, quality, or endurance behavior; those retained results remain revision-bounded below. Routine application-only releases do not maintain a full rollback/configuration backup; any future infrastructure or irreversible-state change requires recovery scoped to what it changes.
## Retained Functional Evidence
-- Exact deployed `main@2d5818c` passed repository hygiene, TypeScript typecheck, all 608 Web tests in 44 files, client and server production builds, focused independent review, and production artifact/service postflight. Exact predecessor `b68c471` separately passed the 261-test SFU admission gate and explicit-Chrome access/privacy gate. Retained Chrome 20-Viewer and responsive visual checks apply only to their recorded predecessor revisions; no current-release physical direct/browser-relay/SFU media claim is inferred.
+- Exact deployed `main@bf32859` passed repository hygiene, TypeScript typecheck, all 613 Web tests in 44 files, client and server production builds, focused independent review, and production artifact/service postflight. Exact predecessor `b68c471` separately passed the 261-test SFU admission gate and explicit-Chrome access/privacy gate. Retained Chrome 20-Viewer and responsive visual checks apply only to their recorded predecessor revisions.
+- Chrome 151 on exact production `bf32859` captured a continuously changing tab with generated audio through real `getDisplayMedia()`. Two Host-direct children plus one browser-relay child and one forced-SFU Viewer all advanced decoded audio energy and video frames at 64/128/256 kbps sender ceilings and after live source replacement. Ordinary paths selected direct UDP; the SFU publisher/subscriber selected LiveKit UDP with empty external ICE-server lists. The UI never reported the faulty constant `1 kbps` with active audio. Direct/browser-relay actual traffic tracked each selected ceiling; SFU 64/128 traffic was higher because the accepted LiveKit default retains RED, so sender ceiling/readback and wire traffic remain distinct. After RTCP mapping became available, direct/browser-relay audio-minus-video playout timestamps ranged from -101 to +4 ms; Chrome exposed no corresponding value on the SFU subscription, so real-game SFU A/V synchronization remains open rather than inferred.
- Exact Browser SFU ICE-server-isolation implementation `ae09c760adec76fd26da611d4928486d105c6d3b` passed repository hygiene, TypeScript typecheck, all 605 Web tests in 45 files, client and server production builds, three independent code reviews, focused 95-test publisher/subscriber and ordinary-peer isolation coverage, deployment postflight, and owner physical SFU fallback media proof. This establishes the reported production connection fix without turning candidate type/count into an invariant; full route/codec/network acceptance remains open.
- A fresh canonical `main@c4962f5` background gate passed repository hygiene, all 605 Web tests, both production builds, the 254-test SFU admission suite, and the Chrome 151 20-Viewer 720p30/30-second local route gate. All 20 Viewers advanced decoded frames, Host and relays stayed within endpoint cap `2`, no orphan SFU publication appeared, and all four current-child timing distributions contained 20 values. The browser gate uses deterministic canvas and does not start LiveKit, so it proves local direct/browser-relay control and media behavior only; it is not physical capture or SFU 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, the selected 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.
@@ -38,8 +39,8 @@ Capacity and routing entries below describe the exact tested source or release o
- Relay resources: current source and production expose the authenticated `1/2/3` endpoint-cap boundary, and retained v10 local loopback evidence covers 20 Viewers at cap `2` only for that source. CPU/GPU/upload and heterogeneous-network measurements remain diagnostics, not authority to change the contract.
- Room scale: current source and production admit 20 Viewers plus one Host, and the retained 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. Browser SFU PCs use the accepted empty-external-ICE-server rule and owner physical media proof closed the reported connection hold. Real LiveKit lifecycle/JWT replay, shaped packet-flow, BWE downshift/recovery, resource use, SFU-fed first-child behavior, and broader heterogeneous-network acceptance remain open. Use Linux `tc` or an authorized public canary for per-leaf shaping, never CDP throttling.
-- Audio: current v12 source and production select the exact active ordinary Host or SFU publisher audio sender and reset samples across track changes or absence. Physical verification of the 64/128/256 kbps settings, negotiated/observed bitrate, audible music quality, route changes, and game A/V synchronization remains open. Bitrate settings are ceilings, not quality proof, and a muted/idle Opus track may legitimately remain near 1 kbps.
-- Observability: current v12 source and production keep local connection details but no Host/Viewer diagnostic downloads or Browser file-export plumbing. The Host-only bounded snapshot stays for automatic acceptance. 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, and selected candidate endpoints. All retained fields diagnose and have no recovery authority; they do not by themselves prove hardware encode, synchronization quality, or route quality.
+- Audio: current v12 source and production select the exact active ordinary Host or SFU publisher audio sender, reset samples across track changes or absence, keep relay children synchronized with persistent-stream audio changes, and reacquire exact SFU publications/senders after reconnect. The reported active-source `1 kbps` observation and all three live ceilings are physically closed on current Chrome/production across direct, browser-relay and SFU. Audible game quality, heterogeneous-network changes and real-game A/V synchronization remain part of route acceptance; a muted/idle Opus track may still legitimately remain near 1 kbps.
+- Observability: current v12 source and production keep local connection details but no Host/Viewer diagnostic downloads or Browser file-export plumbing. The Host-only bounded snapshot stays for automatic acceptance. Chrome 151 supplied selected candidate endpoints and ordinary-route A/V playout timestamps in the current gate, but omitted the SFU A/V timestamp. Target-browser availability and actual values remain open for codec/fmtp and encoder implementation/power efficiency, media-source and encoded FPS, and broader jitter/concealment cases. All retained 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 predecessor `b68c471` passed the access/privacy gate with explicit Chrome and production cutover/postflight, including stale-v11 rejection before authority, room-lived grant/code orthogonality, private entry with and without a password, rotate/revoke, missing-room typing, and memory-only runtime. Headful same-browser preference replay and the isolated VM/IP clean-port matrix remain open; shared-IP smoke cannot approve them.
diff --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 25256acb..125f620c 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
-状态:production 运行精确 application/runtime revision `2d5818ccf57f8ccf0999160ea74a16c9b4d97d12`、release `2d5818c` 和严格 `screener-v12`;canonical `main` 含相同 application/runtime tree 与当前 truth checkpoint。源码与生产已实现 22 字符 room-lived Viewer grant、`ROOM_NOT_FOUND`、产品诊断下载移除、完整短 URL 邀请 UI、收敛的房间密码控件与 exact-current audio stats,并固定 Browser VP8,video 不设置 `contentHint`、audio 保留 `music`,且无 codec UI/state/wire 或分享生命周期分支;Pause/Resume 继续由当前 Host session 和 `shareGeneration` 约束。Owner 的 SFU fallback 实测证据仍严格归属于 predecessor release `c4962f5`。
+状态:production 运行精确 application/runtime revision `bf328590b3de5dfa509fcc70f6316286af3eae7e`、release `bf32859` 和严格 `screener-v12`;canonical `main` 含相同 application/runtime tree 与当前 truth checkpoint。源码与生产已实现 22 字符 room-lived Viewer grant、`ROOM_NOT_FOUND`、产品诊断下载移除、完整短 URL 邀请 UI、收敛的房间密码控件、exact-current audio stats 与音轨跨 relay/SFU reconnect 连续性,并固定 Browser VP8,video 不设置 `contentHint`、audio 保留 `music`,且无 codec UI/state/wire 或分享生命周期分支;Pause/Resume 继续由当前 Host session 和 `shareGeneration` 约束。Owner 的 SFU fallback 实测证据仍严格归属于 predecessor release `c4962f5`。
## 目标与边界
@@ -362,7 +362,7 @@ Token-free SFU standby prewarm 保持可选且不创建 participant、publicatio
## 当前交付边界
-- Production 使用严格单一 `screener-v12` wire 和精确 deployed application/runtime revision `2d5818ccf57f8ccf0999160ea74a16c9b4d97d12`、release `2d5818c`;current source 含相同 application/runtime tree 与当前 truth checkpoint。两者均已实现短 room-lived grant、明确 missing-room 结果、产品诊断下载移除、完整短 URL 邀请 UI 与 exact-current audio stats,固定 Browser VP8 且 video 不设置 `contentHint`,codec selector、quality-state/wire 字段与分享生命周期 codec 分支不存在。
+- Production 使用严格单一 `screener-v12` wire 和精确 deployed application/runtime revision `bf328590b3de5dfa509fcc70f6316286af3eae7e`、release `bf32859`;current source 含相同 application/runtime tree 与当前 truth checkpoint。两者均已实现短 room-lived grant、明确 missing-room 结果、产品诊断下载移除、完整短 URL 邀请 UI、exact-current audio stats 与音轨跨 relay/SFU reconnect 连续性,固定 Browser VP8 且 video 不设置 `contentHint`,codec selector、quality-state/wire 字段与分享生命周期 codec 分支不存在。
- Pause/Resume 由当前 Host session 和 `shareGeneration` 约束。Host 后台性能和 VP8 hardware acceleration 分别按受控根因证据诊断;标准 ICE/SFU 按真实异构网络验收。
- 当前发布面只包含 Web Host、Viewer 和 browser relay。Native sender、capture helper、shared-encode executable 与两个分发包仍由各自后续决策和物理证据驱动,不属于当前 Browser release。