[domistream] Host: session test, fixes, mutation, L1 measurement, 0.2.0 #14

Merged
mnovak merged 11 commits from feature/host-session into main 2026-12-04 13:40:13 +01:00
Owner

Lumen L1 closing PR for DomiStream: the whole client↔host session in memory, two client fixes found by the host work, the host mutation pass, the first black-box measurement of a real client against our host, and version 0.2.0 (the lead tags stream-v0.2.0 after merge).

  • tests/session.rs: serverinfo → pairing with the owner typing the code → HTTPS PairStatus 1 → applist → launch → RTSP (host StreamConfig = what the client announced) → ENet + START_B → sealed video with FEC repairing exactly the parity budget, a burst beyond it reported lost and answered with invalidation + IDR request → sealed audio (no parity) → input and gamepad → rumble → graceful termination. Plus the Tessera-trusted path and an unpaired client refused over HTTPS.
  • Fixes (tests first): EnetClient took VERIFY_CONNECT's session ids the wrong way round (stock ENet; hidden against a fresh slot); MAX_APPS 4095 so a full applist fits the XML element cap, on both sides.
  • Mutation: host rows M25–M51, 26 caught, 1 equivalent (M39, unreachable for a fresh peer slot); M36 survived first and now has a test. The tool runs --no-fail-fast and a row may name several binaries.
  • PROTOCOL.md: "Host side (Lumen)" overview; the lead's decision that ControlStream sends START_B/PERIODIC_PING/IDR with empty bodies (lands in L2); "Measured: Arena Domi Remote against lumen-host [L1]": the real client (0.1.2, emulator, black-box per D2) added the PC as 10.0.2.2:48989, paired through all five phases (phase 4 before 5, U1 for this client), listed all 11 games over HTTPS; the /appasset and /launch parameters it sends (U4 for this client).
  • README status, HANDOVER stream-v0.2.0, workspace version 0.2.0 and the three lockfiles, clippy const assertions.

Evidence: cargo test --workspace 422 passed / 0 failed; clippy -D warnings, fmt, rustdoc -D warnings clean. Fuzz: host_pairing long run 778,128 runs in 601 s, 0 crashes (the other host targets' runs are in HANDOVER).

Clean-room checklist

  • Sources read: none new (stock ENet facts already logged as S-17/S-34). The [L1] facts are our own measurement: lumen-host's request log and the operator's notes. Arena Domi Remote's code and workspace were never opened (its isolated worker drove the emulator and handed over facts only).
  • No forbidden source; no GPL-provenance value.
  • Public repo: the measurement names no address but loopback/emulator ones, no secrets (the log never held salt, certificates, PIN or keys).

Self-review: rebased on #13 (manifest fix). Checked the HANDOVER numbers against the runs, the mutation table against results.json, and that the [L1] section states only what the log and the operator saw.

Lumen L1 closing PR for DomiStream: the whole client↔host session in memory, two client fixes found by the host work, the host mutation pass, the first black-box measurement of a real client against our host, and version 0.2.0 (the lead tags `stream-v0.2.0` after merge). - `tests/session.rs`: serverinfo → pairing with the owner typing the code → HTTPS PairStatus 1 → applist → launch → RTSP (host `StreamConfig` = what the client announced) → ENet + START_B → sealed video with FEC repairing exactly the parity budget, a burst beyond it reported lost and answered with invalidation + IDR request → sealed audio (no parity) → input and gamepad → rumble → graceful termination. Plus the Tessera-trusted path and an unpaired client refused over HTTPS. - Fixes (tests first): `EnetClient` took VERIFY_CONNECT's session ids the wrong way round (stock ENet; hidden against a fresh slot); `MAX_APPS` 4095 so a full applist fits the XML element cap, on both sides. - Mutation: host rows M25–M51, **26 caught, 1 equivalent** (M39, unreachable for a fresh peer slot); M36 survived first and now has a test. The tool runs `--no-fail-fast` and a row may name several binaries. - PROTOCOL.md: "Host side (Lumen)" overview; the lead's decision that `ControlStream` sends START_B/PERIODIC_PING/IDR with empty bodies (lands in L2); **"Measured: Arena Domi Remote against lumen-host [L1]"**: the real client (0.1.2, emulator, black-box per D2) added the PC as `10.0.2.2:48989`, paired through all five phases (phase 4 before 5, U1 for this client), listed all 11 games over HTTPS; the `/appasset` and `/launch` parameters it sends (U4 for this client). - README status, HANDOVER `stream-v0.2.0`, workspace version 0.2.0 and the three lockfiles, clippy const assertions. Evidence: `cargo test --workspace` 422 passed / 0 failed; clippy `-D warnings`, fmt, rustdoc `-D warnings` clean. Fuzz: host_pairing long run 778,128 runs in 601 s, 0 crashes (the other host targets' runs are in HANDOVER). **Clean-room checklist** - [x] Sources read: none new (stock ENet facts already logged as S-17/S-34). The [L1] facts are our own measurement: lumen-host's request log and the operator's notes. Arena Domi Remote's code and workspace were never opened (its isolated worker drove the emulator and handed over facts only). - [x] No forbidden source; no GPL-provenance value. - [x] Public repo: the measurement names no address but loopback/emulator ones, no secrets (the log never held salt, certificates, PIN or keys). **Self-review**: rebased on #13 (manifest fix). Checked the HANDOVER numbers against the runs, the mutation table against results.json, and that the [L1] section states only what the log and the operator saw.
mnovak added 11 commits 2026-12-04 13:40:07 +01:00
A host that answers VERIFY_CONNECT with different incoming and outgoing session ids (stock ENet after a reconnect, PROTOCOL.md 3.1) must see the client send with the verify's outgoing id and accept datagrams carrying the verify's incoming id.
Hosts write four elements per app; MAX_APPS of them plus the root must fit MAX_XML_ELEMENTS, so the app cap is reachable.
The client stored them the other way round (out_session from verify.incoming_session_id). Against a fresh stock slot both are 0, so it never showed; after a reconnect stock ENet answers with two different ids and the client would send with the host's outgoing id and drop every host datagram. Found by the ENet host engineer; facts from stock ENet v1.3.18 as logged in S-17/S-34 (PROTOCOL.md 3.1), no new source read.
4096 apps of four elements each (App, AppTitle, ID, IsHdrSupported) plus the root need 16385 elements, one over MAX_XML_ELEMENTS, so the app cap could never be reached by a list as hosts write it and the host writer already stopped at 4095. Lowering the app cap to (MAX_XML_ELEMENTS - 1) / 4 = 4095 instead of raising the element cap keeps the XML parser's memory bound where it was and makes the two caps one number: the host's MAX_WRITTEN_APPS is now MAX_APPS, with a compile-time check that it fits.
serverinfo over HTTP, pairing with the owner typing the phone's code, serverinfo over HTTPS (PairStatus 1), applist, launch (keys handed over), RTSP with one connection per request (the host's StreamConfig equals the client's ANNOUNCE), ENet + START_B, sealed video over a lossy link (exactly the parity budget lost per block, then a burst beyond it reported lost and answered with reference invalidation and an IDR request, then a recovery frame), sealed audio without parity (losses reported), typed input and a gamepad state, rumble, graceful termination, ENet disconnect and cancel. Also the Tessera-trusted path (no /pair, pinned host certificate) and an unpaired client refused over HTTPS. START_B, PERIODIC_PING and the IDR request go with empty bodies over the probe-style stack because ControlStream refuses them (U10).
mnovak merged commit 51db5a962b into main 2026-12-04 13:40:13 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mnovak/DomiStream#14