diff --git a/docs/implementation-plan.md b/docs/implementation-plan.md index caba341..cbfe454 100644 --- a/docs/implementation-plan.md +++ b/docs/implementation-plan.md @@ -465,6 +465,15 @@ the 40 ms reorder budget and feeds them through the existing playout owner. Both sides use the experimental CultLib/CultMesh snapshot lineage used by Eve, Aetheria, and VoidBot; no stable-branch transport shim was introduced. +Receiver pressure now closes into the long-lived NVENC encoder as bounded AIMD +bitrate control. Late/decode/repair/queue pressure backs off by 15 percent; +clean recovery adds five percent of the configured ceiling only after two +stable seconds. The live encoder proof reconfigured 12 Mbps to 6 Mbps without a +restart and emitted the required transition IDR. The exact remaining completion +gate is tracked in +`docs/research/moonlight-reliability-acceptance-2026-07-16.md`; no cross-host +claim is allowed until its Raven-to-Starfire field matrix passes. + The production receiver follow-up fixed two contract contradictions: early video repair no longer declares the frame late (which had made Odin discard all repair requests), and the OBS audio decoder now consumes Muninn's actual float diff --git a/docs/research/moonlight-reliability-acceptance-2026-07-16.md b/docs/research/moonlight-reliability-acceptance-2026-07-16.md new file mode 100644 index 0000000..6b396a9 --- /dev/null +++ b/docs/research/moonlight-reliability-acceptance-2026-07-16.md @@ -0,0 +1,47 @@ +# Moonlight-level reliability acceptance ledger + +This ledger distinguishes implemented mechanisms from evidence that the actual +Raven-to-Starfire program timeline survives pressure. Passing unit tests is not +permission to call the field path done. + +## Required contracts + +| Contract | Current authority | Evidence | Status | +|---|---|---|---| +| Experimental CultMesh/CultNet lineage | Odin vendored CultLib snapshot `8965f3c0` | Snapshot provenance plus CultNet/Muninn/Sleipnir suites | proved locally | +| Low-delay NVENC | Muninn controllable encoder | D3D11 desktop capture, no B frames/lookahead, two-frame VBV, clean Annex-B decode | proved locally | +| Consumer deadline owns media lifetime | Muninn queues, repair cache, Mimir assembly/reorder | 100 ms default, bounded queues/cache, late-frame repair refusal | proved structurally | +| Recoverable video loss avoids decoder reset | Mimir parity/repair, Odin repair cache | Production XOR parity; live early-feedback fixture; repair expiry tests | proved locally | +| Decoder-chain loss forces immediate IDR | Muninn feedback owner and native encoder | Live 2560x1440 command produced IDR at frame 22 under a 600-frame GOP | proved locally | +| Congestion changes encoder output in-session | Muninn AIMD controller and native encoder | Live 12-to-6 Mbps reconfiguration produced clean IDR at frame 35 | proved locally | +| Audio survives small erasure bursts | Odin 4+2 GF(256), Mimir FEC/reorder/concealment | Exhaustive one/two-erasure Rust and C++ tests; production DLL build | proved locally | +| Latest input state supersedes stale state | Muninn epoch/state sequence, Sleipnir cursor | Duplicate/reorder/stale epoch tests | proved locally | +| Button edges are not lost or retained forever | Muninn replay/app ACK/epoch rebase, Sleipnir ordered cursor | Quick-tap, ACK, overflow rebase, sparse-gap tests | proved locally | +| Real field path survives impairment and soak | Raven sender, Starfire receiver/OBS, `cultnet-impair` | No current run: Raven WireGuard SSH/TCP 22 timed out | **missing** | + +## Field acceptance matrix + +Run the real capture body, production receiver plugin, decoder, audio output, +and Sleipnir virtual input through the seeded profiles under +`E:\Projects\Odin\tests\realtime-impairment`. Observe the rendered/audio/input +timeline, not only proxy CSV counters. + +| Profile | Required result | +|---|---| +| clean, 10 minutes | no decoder reset, audio discontinuity, input edge loss, queue growth, or timestamp drift; video p99 delivery under 50 ms | +| iid 1%, 10 minutes | no input edge loss; audio FEC recovers eligible holes; at least 99.9% video frames presented; media p99 under 80 ms | +| iid 3%, 5 minutes | bounded degradation; at least 99% video frames presented; decoder recovery within 250 ms; no stuck controls | +| burst 4 and burst 8 | parity/repair handles eligible damage; unrecoverable dependency loss produces one requested IDR and recovery within 250 ms | +| reorder and duplicate | no duplicate input action, stale state regression, or unbounded assembly/reorder storage | +| delay/jitter | AIMD reduces bitrate before sustained deadline loss and recovers no faster than one step per two stable seconds | +| stall 250 ms | obsolete media expires; queues remain bounded; input latest state converges within 35 ms after release | +| reconnect | old input epoch cannot act; neutral/current state within 100 ms; decoded video within 500 ms | +| mixed 60-minute soak | stable memory/handle/thread counts and no progressive A/V drift | + +## Completion rule + +Moonlight-level performance is reasonably expected only after all local rows +remain green and the real field matrix passes twice: once on direct LAN and once +on the deployed route actually used during streaming. Failure should change the +owning deadline, FEC, encoder, or input authority—not add a repair loop around +the symptom. diff --git a/state/evidence.jsonl b/state/evidence.jsonl index df4f7c9..50d61d1 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -192,3 +192,4 @@ {"ts": "2026-07-16T20:48:32+01:00", "type": "verification", "status": "ok", "note": "Production Muninn receiver audit fixed two live contract failures: early video repair feedback no longer places live frames in late_frame_ids (which made Odin refuse every repair), with a C++-emitted fixture decoded by Rust; OBS local audio decoder now consumes Muninn's actual f32le stereo 48kHz packets rather than AAC, default reorder is 40ms instead of 2000ms, and short gaps receive bounded silence concealment. Native plugin build and two CTests passed; Odin cross-fixture tests passed."} {"ts": "2026-07-16T21:03:13+01:00", "type": "verification", "status": "ok", "note": "Muninn production audio recovery now uses typed 4+2 GF(256) PCM parity from Odin and a bounded Mimir receiver cache feeding the existing 40 ms reorder owner; native OBS DLL builds and 3/3 CTests pass. Odin cultnet-impair adds deterministic real-socket loss/burst/reorder/duplicate/jitter/stall profiles. Experimental CultLib snapshot lineage remains pinned at 8965f3c0."} {"ts": "2026-07-16T21:26:00+01:00", "type": "verification", "status": "ok", "note": "Receiver decode-chain invalidation now actuates a verified next-frame NVENC IDR through Odin's long-lived libav encoder without restarting A/V or CultNet. Live 2560x1440 D3D11 proof emitted a command-driven IDR at frame 22 under a 600-frame GOP; synthetic proof emitted IDRs at frames 0 and 10 and decoded cleanly. Muninn/Sleipnir edge admission is bounded at 256 via epoch rebase; 174/26 tests pass. Raven field deployment remains pending because 10.77.0.4 SSH and TCP probing timed out."} +{"ts": "2026-07-16T21:35:47+01:00", "type": "verification", "status": "ok", "note": "Muninn receiver pressure now drives bounded AIMD bitrate on the long-lived NVENC context. Live 2560x1440 D3D11 proof reconfigured 12 Mbps to 6 Mbps at frame 35, emitted an IDR at frame 35, and decoded cleanly; 176 Muninn tests pass. Cross-host field acceptance remains missing because Raven SSH/TCP 22 timed out again."} diff --git a/state/map.yaml b/state/map.yaml index 226332a..041cbc2 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -87,6 +87,15 @@ invariants: are temporary smoke/bootstrap edges only. accepted_design: + - Muninn now closes receiver congestion pressure into the live NVENC context. + Every 500 ms it applies multiplicative 15 percent backoff for late frames, + requested recovery, deferred repair, sender queue loss, or combined + jitter/decode pressure above 75 percent of the consumer deadline. Recovery + adds only five percent of the configured ceiling after each two stable + seconds, with a one-quarter/1 Mbps floor. A live 2560x1440 D3D11 proof + changed 12 Mbps to 6 Mbps at frame 35; FFmpeg/NVENC reconfigured the same + session, emitted an IDR at frame 35, and the Annex-B stream decoded cleanly. + Muninn's full suite now passes 176 tests. - Receiver-driven video recovery now reaches the actual NVENC frame owner. Odin's `native/muninn-video-encoder` is a long-lived libavdevice desktop capture and `h264_nvenc` process; a new decode-chain invalidation edge makes