Free, open-source screen sharing for private live streams with friends. Watch together in a browser or self-host Piik. 免费开源的私密屏幕共享,支持游戏直播、一起看电影与自部署。
docs(quality): close unsuitable layer candidates (#46)
AAA4fb64f23828c
diff --git a/docs/adr/0007-demand-driven-dual-representation-quality.md b/docs/adr/0007-demand-driven-dual-representation-quality.mdindex cc917008..0a42364f 100644--- a/docs/adr/0007-demand-driven-dual-representation-quality.md+++ b/docs/adr/0007-demand-driven-dual-representation-quality.md@@ -104,35 +104,45 @@ selection. The existing mobile/iPad heuristic remains limited to conservativerelay-capacity admission. Browser capability queries can guide a bounded probe,but runtime encode/decode behavior is authoritative.-## Deferred Capability Spikes--These spikes start only after the A+B/C evidence contract is trustworthy. They-run in order and stop at the first accepted path, may proceed independently of-ADR-0006 native-sender revalidation, and precede any custom dual-representation-media implementation. They do not change the accepted two-state controller:--1. Negotiate exactly two `HIGH`/`LOW` simulcast encodings on one sender in its- initial envelope, with `LOW` inactive. Verify requested/applied parameters,- per-RID traffic, restart behavior, and actual encoder/CPU/GPU release when- `LOW` is inactive. W3C `active=false` stops that encoding from being sent;- it does not guarantee that a physical encoder or GPU resource is released.- Separate direct PeerConnections have no portable shared-encode contract.-2. On the SFU path, publish at most two LiveKit simulcast- representations and let each one or two roots select independently. Treat- Dynacast as a bounded rejection/verification spike, not an assumed fit. The- pinned server 1.13.5 aggregates the maximum quality requested across all- subscribers/nodes and marks every quality `q <= maxQuality` enabled; client- 2.22.0 applies those flags to simulcast encoding `active`. Thus any `HIGH`- root is expected to keep `LOW` enabled. Firefox disabling is only a roughly- 10 bps, 2 fps, 4x-scale compatibility reduction. Accept this path only if- actual per-RID bytes/frames plus host CPU/GPU/encoder evidence prove that- `LOW` stops while `HIGH` continues; otherwise reject it for the exact- on-demand-`LOW` requirement.-3. Run a bounded SVC viability spike and compare the applied- codec/`scalabilityMode` with Media Capabilities `powerEfficient` and the- game-performance matrix. If simulcast and LiveKit/Dynacast fail while this- path meets current on-demand selection and resource gates, adopt it and stop- before custom media. Reject silent software fallback.+## Standard Capability Short-Circuits++Inspect standard capabilities in order and stop at the first accepted path+before custom dual-representation media. Static API or pinned-protocol+incompatibilities can close a candidate without a browser run; runtime media+gates start only after the A+B/C evidence contract is trustworthy. These+results do not change the accepted two-state controller:++1. **Web P2P simulcast: rejected+ (`no-go-web-p2p-simulcast-layer-selection`).** WebRTC exposes+ `getParameters()` and `setParameters()` on `RTCRtpSender`, including the+ sender-side `active` flag, but `RTCRtpReceiver` exposes only+ `getParameters()` and no standard per-RID layer-selection setter. A sender+ toggle is scoped to that sender and PeerConnection; separate viewer+ PeerConnections have no portable shared-encoder contract. The standard API+ therefore cannot provide one shared `HIGH`/`LOW` encode whose direct P2P+ receivers independently select a layer. Chrome was not run because the+ required product semantic is absent. In particular, the normative rule that+ `active=false` stops sending an encoding is not evidence that its physical+ encoder, CPU work, or GPU allocation is released.+2. **Pinned LiveKit Dynacast: rejected+ (`no-go-livekit-1.13.5-dynacast-cumulative-layers`).** Server 1.13.5 takes+ the maximum quality requested across subscribers and subscriber nodes, then+ enables every quality `q <= maxQuality`; client 2.22.0 applies those flags to+ simulcast encoding `active`. Any root requesting `HIGH` consequently keeps+ `LOW` enabled. This cannot satisfy healthy-room `HIGH` only, one shared `LOW`+ while a weak cohort exists, and `LOW` off after that cohort recovers. The+ Firefox client does not rely on `active=false` being honored and also reduces+ a disabled encoding to 4x scale and 10 bps; it writes non-standard+ `maxFrameRate`, so a 2 fps cap or a stopped layer cannot be relied upon. No+ browser run could change this pinned control contract, so none was run.+ Screener's current publisher still sets `simulcast: false` and constructs a+ Room with Dynacast at its default `false`;+ this result is a capability rejection, not a runtime behavior claim.+3. **SVC: next bounded candidate.** Compare the applied codec and+ `scalabilityMode` with Media Capabilities `powerEfficient` and the+ game-performance matrix. Adopt it only if it meets the on-demand selection+ and resource gates, then stop before custom media. Reject silent software+ fallback.None may reuse PR #28's minimum-of-two target, bypass a per-edge stock WebRTCcongestion controller, or expand the representation limit beyond two.diff --git a/docs/project-memory.md b/docs/project-memory.mdindex 8ec43424..f9ce80d3 100644--- a/docs/project-memory.md+++ b/docs/project-memory.md@@ -10,7 +10,7 @@ Last updated: 2026-08-19- Minimize server bandwidth. The accepted invisible ladder is direct/peer UDP, then SFU/UDP roots, then optional TURN for a selected exceptional edge, then bounded failure. TURN is transport, not topology.- Non-server nodes have at most two downstream edges; browser relays stay at one until resource gates pass. SFU normally feeds one or two roots that retain peer descendants; separately capped server edges may serve exceptional viewers that cannot attach behind a healthy root.- Two-tree packet/layer striping may reduce endpoint upload toward one stream bitrate, but needs a bounded multi-parent, loss, sync, churn, and latency experiment; it is not in the current full-stream chains.-- Flagship native media encodes each active representation once and reuses it across direct, peer, and SFU transports; per-connection packetization, pacing, encryption, feedback, and upload remain independent. Healthy rooms have one shared `HIGH`; verified weak paths may add one shared on-demand `LOW`, never per-viewer encoders. Test simulcast, LiveKit/Dynacast, then SVC and stop at the first standard path that meets on-demand/resource gates; SVC has no software fallback.+- Flagship native media encodes each active representation once and reuses it across direct, peer, and SFU transports; per-connection packetization, pacing, encryption, feedback, and upload remain independent. Healthy rooms have one shared `HIGH`; verified weak paths may add one shared on-demand `LOW`, never per-viewer encoders. Standard Web P2P simulcast and pinned LiveKit 1.13.5/JS 2.22.0 Dynacast are static no-go paths for that exact selection policy; SVC is next and has no software fallback.- Keep decisions, snapshots, research, code, `AGENTS.md`, and `.codex/` in Git; rewrite memory/status in place. Research current primary sources before material work and reject speculative machinery.- Migrate client, server, and deployment atomically. After a canary, delete superseded config/wire/parsers/tests; do not retain compatibility layers, dual writes, or a second architecture without a current consumer. Git history owns the old implementation.@@ -25,7 +25,7 @@ Last updated: 2026-08-19- Keep the failure-only controller default-off until the isolated STUN/SFU exact-room gates pass. Preserve break-before-make, sticky healthy subtrees, mobile leaves, and PR #20 prewarm; public transport/load remains open.- Local reparenting is a later candidate: start with unassigned relay admission rescue; do not block current work.- Flagship media is UDP; HTTPS/WSS stays TLS/TCP. Old production retains coturn TURN for rollback. The candidate uses self-hosted STUN-only ordinary ICE and separate LiveKit SFU/UDP, with no TURN/media-TCP wire.-- Treat settings as ceilings and deployed degradation as unclassified. Use correlated Host A+B/Viewer C to compare exact `769de201f7cc` against current `main` for Host-only recovery, game FPS/load, preview cost, actual codec/encoder and one-variable rebuilds; then test standard simulcast/LiveKit/SVC before custom `LOW`. Never use UA or a composite score.+- Treat settings as ceilings and deployed degradation as unclassified. Use correlated Host A+B/Viewer C to compare exact `769de201f7cc` against current `main` for Host-only recovery, game FPS/load, preview cost, actual codec/encoder and one-variable rebuilds; then gate SVC before custom `LOW`. Never use UA or a composite score.- Production reports poor film audio and self-echo when system capture includes voice software. Diagnose audio A/B/C and sync; Web cannot isolate arbitrary processes and `maxBitrate` is not quality-up. A Windows 11 native candidate defaults to game-process-tree audio and never widens silently; Windows 10 remains unresolved/unsupported. See `docs/research/browser-screen-audio-quality.md`.- Post-gate UI: local volume/mute, display name, transient roster, local-only candidate endpoints, and RTP loss rate; no accounts, database, telemetry, media, or routing effects.- Do not add scene detection, dynamic-FPS control, or forced AV1 until stats and target hardware prove the need. Codec acceptance requires actual negotiation, power-efficient candidate evidence, interval encode cost, game FPS, CPU/GPU and sender count; Discord's native capture/hardware tuning is comparison evidence, not proof of server re-encoding or a reusable preset.@@ -44,13 +44,10 @@ Last updated: 2026-08-19- The default-off ADR-0005 controller has no production peer/SFU configuration. Enabling it requires non-empty exact `PEER_ASSISTED_ROOM_IDS`; missing/blank fails startup and unlisted rooms use current ordinary P2P. `screener-v1` is the single signaling literal; mismatch terminates once with a refresh prompt.- When enabled, peer recovery precedes allowlisted SFU; session revisions prepare/commit/abort and active SFU gets one token refresh before failback. Browser relays re-encode; native sharing is outside product code.- Chrome 151/LiveKit localhost A/B cut failure-to-active/render from 1.481/2.257 seconds to 0.200/0.320; 31 new frames and 25 ms sampling kept host edges at two. It is headless synthetic 720p30 and includes SDK/network prewarm, not public-network evidence.-- Draft native ladder #16/#18/#22/#23/#25/#28 has one bounded Chrome 720p30 loop: one WebCodecs object feeds two Pion/browser legs, applies an experiment-only minimum stock-GCC target, and recovers one isolated loss. It does not prove one hardware encode.-- Stock Pion GCC plus negotiated RTX is a no-go. The no-RTX candidate can distort loss statistics and stays outside product code until audio, heterogeneous estimates, broader loss, TURN/reconnect, and browser-diversity gates pass; do not add custom congestion control to bypass them.-- Chrome 151 short synthetic `1/3/5/8` runs kept host edges at two, relay edges at one, and all viewers decoding; a three-viewer relay close recovered in 5.32 seconds. This proves topology/control only, not quality, load, endurance, or silent partitions.-- The current quality stack uses one strict, non-persistent `QualitySettings` value with bounded ceilings and clarity/balanced/fluid preference. Sender readback and limitation warnings remain manual diagnostics. ADR-0007's automatic per-path `HIGH`/`FALLBACK` and unique on-demand shared `LOW` are accepted mainline behavior, but the state controller and `LOW` runtime are unimplemented.-- Chrome 151 synthetic 720p30 propagated balanced/clarity to one host and three viewers without changing peer identities; all viewers kept decoding and fanout stayed host two/relay one. This proves control continuity only.+- Native drafts #16/#18/#22/#23/#25/#28 remain experiments: one WebCodecs object is not hardware proof; stock GCC+RTX is no-go, and no-RTX remains outside product code.+- Chrome 151 synthetic topology/quality-control runs kept fanout 2/1 and all viewers decoding; one relay close recovered in 5.32 seconds. This is control evidence only.+- Quality controls remain ceilings with diagnostics. ADR-0007's per-path `HIGH`/`FALLBACK`, one on-demand shared `LOW`, and controller are unimplemented. Web P2P simulcast lacks receiver RID selection and LiveKit Dynacast cumulatively enables `LOW`; both are static no-go results without Chrome or resource-release claims. SFU publishing remains non-simulcast with Dynacast off; SVC is next.- Local Host A+B aligns capture with one unique outbound RTP/remote/transport pair and rejects ambiguous or stale generations. Authenticated Viewer C now adds a nullable, sanitized two-second receive window of at most 2 KiB for each current ordinary or peer-assisted P2P hop; the server derives identity and current connection/revision, and the parent correlates only matching local B. It retains no raw fmtp/SDP/stats, performs no media action, and fails closed for SFU-fed roots. Automatic control and `LOW` remain absent.-- Release `769de201f7cc` passed CI/hygiene/typecheck, 22 files/274 tests, both builds, zero production dependency vulnerabilities, atomic activation, public health/access, exact bundle, and service/log checks.## Provisional Quality Targetsdiff --git a/docs/research/realtime-quality-adaptation.md b/docs/research/realtime-quality-adaptation.mdindex 99fc727d..a2723b2c 100644--- a/docs/research/realtime-quality-adaptation.md+++ b/docs/research/realtime-quality-adaptation.md@@ -283,28 +283,45 @@ defines `hardwareAcceleration` only as a hint the user agent may ignore.Therefore none is, by itself, proof of a particular hardware encoder, and asoftware SVC fallback must not be silent.-After trustworthy A+B/C, evaluate three bounded capability spikes in order and-stop at the first accepted path before custom dual-representation media work;-they do not wait for ADR-0006 native-sender product acceptance. First, negotiate-`HIGH`/`LOW` simulcast in one sender's-initial envelope with `LOW` inactive and prove applied parameters, per-RID-bytes/frames, and CPU/GPU/encoder release; separate PeerConnections have no-portable shared-encode contract. Second, test at most two independently-selecting LiveKit roots, but expect pinned server 1.13.5 to enable every layer-at or below the maximum requested quality, so a `HIGH` root also keeps `LOW`-enabled; client 2.22.0 then applies `active`, with Firefox using only a low-rate,-low-FPS, 4x-scale fallback. Reject Dynacast for the exact on-demand-`LOW`-requirement unless runtime and resource counters disprove that boundary. Third,-compare requested/applied SVC mode and Media Capabilities `powerEfficient`,-with no software fallback. None may bypass PR #28's stock-GCC/RTX stop line.--Retain a favorable, testable hypothesis: on target GPUs, adding one low-rate,-low-resolution hardware `LOW` representation may have no material game impact.-Compare `HIGH` against `HIGH+LOW` under one scene using game FPS/p1 low, CPU,-GPU video-encode/copy activity, interval encode cost, actual encoder identity,-and LOW bytes/frames. If the increment stays inside the accepted game budget,-adopt the simpler on-demand dual representation and stop; do not continue into-SVC or custom media merely for theoretical encoder-count elegance.+The first two standard capability candidates close on static semantics, without+a Chrome run. WebRTC provides sender-side encoding control but no+`RTCRtpReceiver.setParameters()` or other standard per-RID subscription method.+Consequently, direct P2P receivers cannot explicitly choose `HIGH` versus `LOW`+from one shared simulcast sender, while separate viewer PeerConnections have no+portable shared-encoder contract. This is+`no-go-web-p2p-simulcast-layer-selection`. The unrun sender experiment makes no+claim about per-RID traffic or whether `active=false` releases a physical+encoder, CPU work, or GPU allocation.++Pinned LiveKit is also a static no-go for this exact policy. Server 1.13.5 takes+the maximum requested quality across subscribers and subscriber nodes and+enables every quality at or below that maximum. Client 2.22.0 applies those+flags to simulcast encoding `active`. Thus any `HIGH` root also keeps `LOW`+enabled, which cannot produce healthy-room `HIGH` only, a shared `LOW` only+while weak roots need it, and `LOW` off after recovery. Because its Firefox+path does not rely on `active=false` being honored, it also applies 4x scale and+10 bps; its `maxFrameRate` field is not the standard `maxFramerate`, so neither+a 2 fps cap nor a stopped layer can be treated as applied. This is+`no-go-livekit-1.13.5-dynacast-cumulative-layers`; a browser resource run+could not change the pinned control contract and was not performed. Screener's+current publisher remains `simulcast: false` with default-disabled Dynacast, so+this is not a claim about current runtime behavior.++The next standard candidate is a bounded SVC spike. Its static codec/layer+semantics may be checked before A+B/C; browser media and resource gates wait for+trustworthy A+B/C. Compare requested/applied mode and Media Capabilities+`powerEfficient`, with no silent software fallback. Stop before custom media if+it meets the on-demand selection and resource gates. None of these paths may+bypass PR #28's stock-GCC/RTX stop line.++If SVC does not pass and custom dual representation remains necessary, retain a+favorable, testable hypothesis: one low-rate, low-resolution hardware `LOW` may+have no material game impact. Before accepting that custom path, compare `HIGH`+against `HIGH+LOW` under one scene using game FPS/p1 low, CPU, GPU+video-encode/copy activity, interval encode cost, actual encoder identity, and+`LOW` bytes/frames. Passing permits the custom on-demand path; failure preserves+`HIGH` and fails the weak path visibly. It cannot reopen an earlier static no-go+or bypass the two-state policy and resource budget.## Why Offline Encoding Presets Do Not Transferdiff --git a/docs/status.md b/docs/status.mdindex 5301fce8..986bcc9b 100644--- a/docs/status.md+++ b/docs/status.md@@ -19,11 +19,9 @@ unconfigured, so production remains one host connection per viewer and P2P/TURN.## Verified Evidence-- Release `769de201f7cc` passed CI/hygiene/typecheck, 22 files/274 tests, both builds, and zero production dependency vulnerabilities.-- Chrome 151 synthetic `1/3/5/8` kept host/relay edges at 2/1 and all viewers decoding; slowest first frame was 1.05 seconds and one three-viewer relay close recovered in 5.32 seconds.-- Synthetic Chrome 151 720p30 propagated balanced/clarity to one host and three viewers without peer changes; decoding and 2/1 fanout continued. This proves control continuity only.+- Release `769de201f7cc` passed CI/hygiene/typecheck, 274 tests, both builds, zero production dependency vulnerabilities, atomic health/access/bundle/SQLite/service/log checks, and responsive 320/375/390 px checks without live media; rollback is ready.+- Chrome 151 synthetic `1/3/5/8` and 720p30 quality-change runs kept 2/1 fanout and decoding; slowest first frame was 1.05 seconds and one relay close recovered in 5.32 seconds. This is control evidence only.- Chrome 151/LiveKit localhost A/B measured cold active/render at 1.481/2.257 seconds versus standby 0.200/0.320 with host edges at two. It includes SDK/prewarm and is not public-network evidence.-- Atomic activation passed health/access, exact bundle, SQLite preservation, services, and logs; the old release is rollback-ready. Responsive 320/375/390 px checks passed without live media.- Host A+B aligns capture/outbound identity, deltas, path, and nullable transport-bound codec/`scalabilityMode`. Authenticated Viewer C is limited to the current ordinary or peer-assisted P2P hop and its connection/revision; two-second windows are at most 2 KiB, sanitized, generation-bound, and read-only. Stale, ambiguous, and SFU-fed evidence fails closed; no raw media metadata is retained.- HTTPS/WSS, access and room/WebSocket auth, renewal, public STUN, and authenticated TURN/UDP/TCP relay-only paths pass; TURN/TLS is off.- Draft #16/#18/#22/#23/#25/#28 passed isolated experiments only. ADR-0006 reached host setup/one encoder output, then timed out before viewer 1 decoded/rendered.@@ -34,11 +32,11 @@ unconfigured, so production remains one host connection per viewer and P2P/TURN.- Android Chrome/iOS Safari leaves are unverified; runtime conservatively marks detected mobile/iPad clients as leaves.- Silent partitions can wait 30 to 60 seconds for heartbeat detection before the default 5-second grace; this remains unverified.- Real audio and heterogeneous clients remain unverified. Production reports poor film audio and voice-call self-echo under system capture; there is no app audio ceiling or Web process isolation. Diagnose A/B/C and sync, then gate Windows 11 game-process audio; Windows 10 stays unresolved without system fallback.-- Production `769de201f7cc` reportedly sustains native `qualityLimitationReason=bandwidth` and severe blur with one capable LAN/direct viewer; only Host refresh restores quality. Within the five-second grace, stable-clientId Viewer refresh retains its `peerId`/`HostPeer`, while Host refresh rebuilds peers/capture; churn persistence is also reported. This prioritizes but does not prove sender/PC/GCC/capture generation over network or lifecycle causes.-- ADR-0007 remains incomplete. A+B/C browser support and the reported case are unverified; the controller, `LOW`, and an authenticated SFU last-hop C generation are absent. Weak paths must share one `LOW`; fail closed protects `HIGH` only exceptionally, and an unreliable supported cohort fails acceptance.+- Production `769de201f7cc` reportedly sustains bandwidth-limited blur on a capable LAN; Host refresh recovered while Viewer refresh did not, and persistence across churn was also reported. This prioritizes, but does not prove, host sender/PC/GCC/capture generation.+- ADR-0007 remains incomplete: the reported case/A+B/C matrix is unverified; the controller, `LOW`, and SFU last-hop C are absent. Weak paths share one `LOW`, and an unreliable supported cohort fails acceptance.- Browser relays re-encode. ADR-0006 is no-go-unclassified: downstream checkpoints and two-edge/FIFO/TURN gates are absent. Spikes prove one WebCodecs object, not hardware; GCC+RTX is no-go and no-RTX weakens stats.- Browser fanout is host two/viewer one; any accepted endpoint relay stays capped at two downstream edges.-- Pinned LiveKit 1.13.5 Dynacast enables all qualities at or below the room's maximum request, so a `HIGH` root is expected to keep `LOW` enabled. It remains a bounded rejection/verification spike, not evidence that on-demand `LOW` can stop.+- Web P2P simulcast and pinned LiveKit 1.13.5/JS 2.22.0 Dynacast are static no-go: no receiver RID-selection/shared-encoder contract, and `HIGH` cumulatively enables `LOW`. No Chrome/resource-release claim follows; current SFU publishing is non-simulcast/Dynacast-off. SVC is next.- The corrected standby smoke is localhost/headless/video-only; public DNS/TLS reuse, transport, audio, shaping, load, mobile, endurance, and sub-25 ms overlap remain open.## Next Milestone@@ -49,8 +47,8 @@ A+B while separately rebuilding one `HostPeer`, replacing capture, and fullyrefreshing Host. Only a proven stuck generation justifies guarded recovery; neverreconnect periodically, force AV1, or raise ceilings blindly.-After that reproduction, test simulcast/LiveKit/SVC in order and stop at the-first fit before custom `LOW`, independently of ADR-0006. Diagnose audio A/B/C,+After that reproduction, run the bounded SVC capability gate and stop if it+fits before custom `LOW`, independently of ADR-0006. Diagnose audio A/B/C,sync, and voice-source leakage in parallel when it does not displace that P0;`maxBitrate` is not a quality fix. WebRTC/LiveKit owns congestion/layers; the appowns two-state policy. An isolated exact room later gates peer/SFU UDP anddiff --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 890f5de2..00ff46e3 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"@@ -182,7 +182,7 @@ SVC 是 simulcast 与 LiveKit/Dynacast 均未满足后的第三个标准候选质量控制不放宽媒体拓扑预算:host 仍最多两条下游媒体边;native relay 只转发选定表示的编码包,不解码重编码。后续双树或条带化可把 host 上传从约两份完整码率推向一份加必要冗余,但不阻塞按需双表示的实现。-标准表示能力排在完整 A+B/C 证据之后、任何自定义双表示媒体实现之前,并可与 ADR-0006 native sender 复核并行:依次做同 sender simulcast、最多两个 LiveKit root 的 Dynacast 验证/否决和 SVC spike,首个满足语义与资源门槛的路径立即结束序列。具体门槛由 ADR-0007 和[实时质量调研](./research/realtime-quality-adaptation.md)持有,任何方案都不得复用 PR #28 的 minimum-of-two 或绕过 stock WebRTC congestion control。+标准表示能力排在任何自定义双表示媒体实现之前,并可与 ADR-0006 native sender 复核并行。静态 API 或 pinned 协议不满足可在完整 A+B/C 前短路否决;只有 runtime media/resource gate 等待可信 A+B/C。序列依次为同 sender simulcast、最多两个 LiveKit root 的 Dynacast 和 SVC;前两项已静态 no-go,SVC 是下一候选,首个满足语义与资源门槛的路径立即结束序列。具体门槛由 ADR-0007 和[实时质量调研](./research/realtime-quality-adaptation.md)持有,任何方案都不得复用 PR #28 的 minimum-of-two 或绕过 stock WebRTC congestion control。## 媒体传输配置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 f6992827..3d4501bd 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"@@ -41,7 +41,7 @@- [ ] Peer-assisted 媒体实验:分享端最多两个 child、每名 viewer 最多一个 child;信令服务只按深度和服务端加入序号确定性地形成两条 sticky 平衡链,不加入综合评分或主动重平衡。每个 viewer 将收到的标准 remote track 通过新的 `RTCPeerConnection` 转发,因此会逐跳解码和重编码;必须测量而不能称为 shared encode。服务端只在受房间数限制的内存状态中保存当前严格校验的质量设置,不写入 SQLite;host 鉴权后先重报设置,在线 viewers 接收更新,后加入者从鉴权快照取得当前值。该功能在 ADR-0004 的实验门槛通过并由后续 ADR 正式接受前不得成为产品路径。- [ ] 原生 shared encode 分享端:后续独立的 Electron/原生分享端必须让每个 active representation 只产生一份兼容编码结果,并在 direct、peer 与 SFU transport 间复用;健康时只有共享 `HIGH`,弱路径期间最多再有一份共享 `LOW`。每条连接仍保留独立 WebRTC packetization、SSRC、pacing、加密和反馈,且各自消耗上传带宽。浏览器不保证跨 `RTCPeerConnection` 复用编码器,因此当前 Web spike 不能宣称满足该保证。- [ ] 原生 shared encode relay:具备原生 relay 能力的 audience 同样最多维护两条下游媒体边,并应复用兼容编码输出而不再次编码。普通浏览器 audience 继续作为 leaf 或使用当前会逐跳重编码的实验路径,不伪称 shared encode。-- [ ] 条件式 SVC:在完整 A+B/C 证据之后,按 simulcast、LiveKit/Dynacast、SVC 顺序短路验证,并可与 ADR-0006 native sender 复核并行。前两项失败而 SVC 满足独立选层、requested/applied codec/`scalabilityMode`、hardware/power-efficient、真实游戏性能和亚秒延迟门槛时即可采用并停止自研;不得静默回退为高负载软件 SVC。它不是预选默认方案,未来严格单输出要求只会加强而不是创建采用理由。+- [ ] 条件式 SVC:标准能力按 simulcast、LiveKit/Dynacast、SVC 顺序短路,并可与 ADR-0006 native sender 复核并行;静态 API 或 pinned 协议不满足可在完整 A+B/C 前否决,只有 runtime media/resource gate 必须等待可信 A+B/C。前两项已静态 no-go;SVC 满足独立选层、requested/applied codec/`scalabilityMode`、hardware/power-efficient、真实游戏性能和亚秒延迟门槛时即可采用并停止自研,不得静默回退为高负载软件 SVC。它不是预选默认方案,未来严格单输出要求只会加强而不是创建采用理由。- [ ] 分包/分层多树实验:把编码包、对象或可独立解码层拆到多个 peer 路径以分散上传,只能在独立 spike 中验证。必须保持亚秒级,处理多父重组、排序、丢包恢复、关键帧、同步和节点退出;未通过门槛前不进入产品路由控制器。- [ ] SFU-root 中央兜底:产品部署目标必须提供经 canary 验收的单节点 SFU 资源;系统在 direct/peer UDP 不可用或明确拓扑预算无法接纳时自动把它作为主要中央兜底,不要求用户选模式。它只向总计一至两个必要 roots 出口;root 优先承担受限 peer descendants,没有可靠 relay root 时必要 viewer 只作为同一总上限内的零 descendants root。已关闭 PR #12 的显式整房 SFU 模式已被取代。当前 PR #17 实现仍是 default-off、failure-only 且生产未配置;按 ADR-0005 的 exact-room canary 验收并修改配置契约后,才能启用新的默认梯级。- [ ] 分享端桌面封装:用 Electron 固定 Chromium 版本、改善选源/热键/系统音频体验,同时保留 Web 观看端。