Files
DomiStream/docs/HANDOVER.md
T

5.5 KiB
Raw Blame History

DomiStream — handover

stream-v0.2.0 (2026-12-04)

The GameStream host side, sans-I/O, for Lumen (milestone L1, docs/LUMEN-HOST-PLAN.md 3.1), next to the client of v0.1.0. The host notes per protocol are listed at the top of docs/PROTOCOL.md ("Host side (Lumen)").

Part Module
request head and query parsing into typed routes, XML answers (serverinfo, applist, launch/resume, pair, errors) host::http
the host's pairing machine (pending-PIN slot, proof and signature checks), Tessera-trusted clients without a PIN host::pairing
RTSP session (order, Session, statuses), DESCRIBE writer, strict ANNOUNCE parser rtsp::server
accepting ENet peer, as stock ENet 1.3 accepts enet::host
control host: client frames (replay refusal), rumble, termination, stop deadline control::host
video packetizer (FEC blocks with Cauchy parity, AES-GCM sealing), Opus audio packetizer (AES-CBC, no parity: U16) video::packetizer, audio::packetizer

Fixed on the client side (tests first, separate commits):

  • ENet session ids. EnetClient took VERIFY_CONNECT's session ids the wrong way round (stock ENet: the client's incoming id is the verify's incoming id). Hidden against a fresh slot (0/0); after a reconnect a stock host answers with two different ids and the client would have dropped every host datagram. Found by the ENet host engineer.
  • Applist cap. MAX_APPS was 4096, but 4096 apps of four elements need 16,385 XML elements (cap 16,384), so the app cap could never be reached. Now 4095 = (MAX_XML_ELEMENTS − 1) / 4 on both sides.

Evidence (worktree checks, 2026-12-04, every cargo run gated on CPU and RAM below 90 % and drives below 95 %):

  • cargo test --workspace: TESTS passed, 0 failed, among them tests/session.rs: a whole session between our client and our host in memory (pairing with the owner typing the code, HTTPS, launch, RTSP, ENet + START_B, sealed video with FEC repairing exactly the parity budget per block and a burst beyond it reported lost and answered with invalidation and an IDR request, sealed audio, input, gamepad, rumble, termination), plus the Tessera-trusted path and an unpaired client refused over HTTPS.
  • Mutation pass on the host modules: MUTATION (M25–M51, docs/MUTATION.md); the client rows M1–M24 are those of v0.1.0.
  • Fuzz, host targets (module engineers; Windows MSVC, SanitizerCoverage, libFuzzer), 0 crashes: host_http_request 8,784,228 runs in 75 s; host_pairing 45,096 in 75 s; rtsp_server 895,897 in 121 s; announce 11,659,642 in 121 s; enet_host 2,534,001 in 60 s, then 26,839,291 in 600 s; control_host 611,513 in 60 s; video_packetizer_roundtrip 113,740 in 76 s. 32 targets in all; the 25 client targets' runs are those of v0.1.0.
  • clippy -D warnings, fmt and rustdoc -D warnings are clean.

Open:

  • Interop with real clients unverified. Arena Domi Remote (Android emulator) and the Moonlight PC app against lumen-host's listeners, black-box (D2), at the end of L1.
  • START_B, PERIODIC_PING, IDR request from our own client. ControlStream refuses them (bodies U10), so with it alone our client cannot start a stream on our host, and a host with the default 60 s stop deadline would end the session. The session test sends them with empty bodies over EnetClient + ControlCipher, as gs-probe does. Decision for the lead: let ControlStream send empty bodies (what Moonshine and Lumen read) or wait for U10.
  • The plan's long fuzz run (7.1) was made for enet_host (600 s) but not for host_pairing (75 s).
  • Audio parity (U16), HDR_MODE and the plain TERMINATION are refused on the host until measured.

stream-v0.1.0 (2026-11-26)

The GameStream client, sans-I/O, for Arena Domi TV (Play remotely Day 1).

Part Module
pairing handshake (4-phase PIN exchange, client cert), serverinfo, app list, launch pairing, http
RTSP client and framer, SDP rtsp
ENet 1.3-compatible client peer enet
control channel (AES-GCM, replay refusal), input and gamepad messages control, input
RTP, Reed-Solomon FEC, video depacketizer (FEC recovery), Opus audio depacketizer (4 + 2 FEC) rtp, fec, video, audio

Evidence (worktree checks, 2026-11-26, every run gated on CPU, RAM and drives below 90 %):

  • cargo test --workspace: 242 passed, 0 failed. QA wrote the tests before the code; vectors come from OpenSSL 3.5, Python hashlib and .NET 10, with test-only keys.
  • Mutation pass: 24 of 24 caught (docs/MUTATION.md, rerunnable with tools/mutation/mutate.py).
  • Fuzz: 25 targets × 60 s, 0 crashes, from 59,665 (pairing_session) to 101 M (rtp_header) executions; then pairing_session for 600 s: 574,761 runs, 0 crashes. Windows MSVC, SanitizerCoverage, libFuzzer (fuzz/).
  • clippy -D warnings, fmt and rustdoc -D warnings are clean. getrandom is not in the dependency tree.

Open (see docs/PROTOCOL.md §UNKNOWN):

  • Interop unverified. U1, U2, U4–U10 and U17 block a real stream; they are settled live on Play remotely Day 1 against the pinned Sunshine (Mark, 2026-11-25: "COntinue roadmap without the check"). Expect stream-v0.1.x.
  • U16 (audio parity matrix: audio plays without it at zero loss) and U19 (video encryption layout).
  • tools/lab-relay and its scripts were never run (docs/LAB_CAPTURE.md); they're kept for byte logs on Day 1.
  • The live sitting is prepared: tools/gs-probe (a desktop probe client driving these state machines over real sockets, built and unit-tested, never run against a host) and its run book docs/LIVE-INTEROP.md.