Files
DomiStream/docs/HANDOVER.md
T

88 lines
6.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# DomiStream — handover
## stream-v0.2.2 (2026-12-04)
After the L2 demo (Arena Domi Remote crashed at Lumen's first video frame): the video packetizer splits FEC blocks
evenly, larger blocks first (RFC 5052 9.1, as Moonshine's host does it), and a refused INPUT_DATA names its input
type for the logs (`ClientControlMessage::InputRejected::input_type`). The frame index starting at 1 is the caller's
(Lumen's) job; PROTOCOL.md 5.2 records it. Tests first; workspace 424 passed, 0 failed.
## stream-v0.2.1 (2026-12-04)
Patch for Lumen L2: the client's `ControlStream` sends `START_B`, `PERIODIC_PING` and the IDR request with empty
bodies (PROTOCOL.md 3.3; `START_A` stays refused, U10), so our own clients can start and keep a stream on Lumen
(PR #15, tests first). Workspace 422 passed, 0 failed; clippy, fmt and rustdoc clean.
## 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`: **422 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: **26 of 27 caught, 1 equivalent** (M25–M51, `docs/MUTATION.md`; M36 first survived and got a test; M39 is unreachable for a fresh peer slot); 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, then 778,128 in 601 s (lead, 2026-12-04); 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: pairing, serverinfo and applist measured.** Arena Domi Remote 0.1.2 in the Android
emulator paired with Arena's lumen-host L1 skeleton (this release's host side) over loopback and listed all games
(PROTOCOL.md, "Measured" [L1]). Streaming against a real client starts in L2. The Moonlight PC app is not
measured yet.
- **START_B, PERIODIC_PING, IDR request from our own client.** `ControlStream` refuses them (bodies U10); decided:
it sends them with empty bodies, with the first streaming client of L2. The session test sends them over
`EnetClient` + `ControlCipher`, as gs-probe does.
- 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`.