Commit Graph

97 Commits

Author SHA1 Message Date
mnovak 989defcc88 [domistream] Host pairing: the host's state machine (pending-PIN slot, proof and signature checks, deadlines from the caller, trusted clients without a PIN) 2026-12-04 12:48:25 +01:00
mnovak 3106f2cb46 [domistream] Host HTTP: strict request head and query parsing into typed routes, XML answers the client parsers accept (head-end test corrected: a 64 KiB buffer without the empty line is already over the cap) 2026-12-04 12:48:25 +01:00
mnovak bdd867c521 [domistream] Host pairing: tests first (client and host paired in memory, wrong PIN on both sides, order, timeouts, trusted clients) 2026-12-04 12:48:25 +01:00
mnovak 3aa3775de8 [domistream] Host HTTP: tests first (request head and query parsing, caps, XML answers read back by the client parsers); API stubs return Unimplemented 2026-12-04 12:48:25 +01:00
mnovak 7b9b1f4e9c [repo] Merge: feature/host-enet-control (ENet accepting side and control host, PR #11) 2026-12-04 12:48:07 +01:00
mnovak f0aac13f12 [fuzz] rustfmt the host targets 2026-12-04 12:46:47 +01:00
mnovak 95380a3b37 [repo] Docs: the accepting side of ENet and the control host (PROTOCOL.md 3.1, 3.3); S-34 stock ENet host-side functions 2026-12-04 12:46:47 +01:00
mnovak db56a5dbb1 [fuzz] enet_host and control_host targets
enet_host: accept on the first datagram or a canned connect (optionally acknowledged), then datagrams, some with our header; asserts outgoing datagrams parse within the MTU and deliveries stay under the cap. control_host: a connected ControlHost fed sealed arbitrary plaintexts, replayed sequence numbers, arbitrary frames in valid commands and raw datagrams; asserts parse_client_message invariants and that no message appears without a sealed frame. 60 s each, 0 crashes.
2026-12-04 12:46:39 +01:00
mnovak e082570a3f [domistream] Control host: ControlHost (client frames opened with replay refusal, typed client messages, host messages, stop deadline)
parse_client_message types START_B, PERIODIC_PING, INPUT_DATA (through input::parse_input), IDR, INVALIDATE_REF_FRAMES, LOSS_STATS and FRAME_STATS (raw bodies) and skips anything else as Unknown. encode_host_message sends rumble, trigger rumble, motion, RGB LED and the extended termination; the plain termination (U10) and HDR_MODE (GPL-provenance layout) stay Unsupported. StopDeadline ends a session without PERIODIC_PING (default 60 s).
2026-12-04 12:46:39 +01:00
mnovak f8bad73121 [domistream] ENet host: EnetHostPeer, the accepting side (verify connect, session ids, reliable channels, pings, timeouts, disconnect)
One peer per client address. CONNECT answered with a reliable VERIFY CONNECT as stock ENet 1.3 does it (session ids picked from the client's offer, MTU, window and channels clamped, throttle echoed); connected once the client acknowledges the verify; reliable, unreliable and unsequenced delivery with fragment reassembly under the existing caps; duplicate unsequenced groups dropped; pings when the client is quiet; retransmission and timeout as the client; disconnect both ways. Shares the client's channel, fragment and in-flight types.
2026-12-04 12:46:39 +01:00
mnovak 58910d00fa [domistream] Control host: tests first (ControlStream against ControlHost, replay, stop deadline), API stubs
Input arrives typed and byte-identical to what the client encoded; host rumble, trigger rumble, LED, motion and termination reach the client; replays, forgeries and malformed messages are dropped; the stop deadline ends a session without PERIODIC_PING. Alloc caps for the host parsers. They fail against the stubs.
2026-12-04 12:46:39 +01:00
mnovak e77c5fcd83 [domistream] ENet host: tests first (client against host over an in-memory lossy wire), API stubs
EnetHostPeer is the accepting side, one peer per client address. The tests drive our EnetClient against it with simulated time, loss, duplication and reordering, plus a scripted client for the stock ENet 1.3 facts (verify connect fields, session ids, what is acknowledged when). They fail against the stubs.
2026-12-04 12:46:39 +01:00
mnovak eae3b9e754 [repo] Merge: feature/host-rtsp-server (RTSP server, DESCRIBE and ANNOUNCE, PR #10) 2026-12-04 12:46:30 +01:00
mnovak fd4285aff0 [domistream] RTSP server: PROTOCOL.md 2.5 (host side, ANNOUNCE required/defaulted table), clean-room sources S-30 to S-32 2026-12-04 12:44:49 +01:00
mnovak a86a689b1f [domistream] RTSP server: session state machine, DESCRIBE writer, strict ANNOUNCE parser, response encoder and request framer; test fixes (escaped CRLF in alloc_caps, CSeq test state, clippy) 2026-12-04 12:44:49 +01:00
mnovak 27b7f2bf1d [fuzz] RTSP server: rtsp_server (session fed arbitrary requests after a valid prefix) and announce targets 2026-12-04 12:44:49 +01:00
mnovak 54bc9f5faf [domistream] RTSP server: tests first (in-memory client/server session, order, Session, ANNOUNCE parser, DESCRIBE writer, caps); API stubs return Unimplemented 2026-12-04 12:44:40 +01:00
mnovak 33b7b90b65 [repo] Merge: feature/host-packetizers (video and audio packetizers, PR #9) 2026-12-04 12:44:34 +01:00
mnovak 81ddf64bee [fuzz] video_packetizer_roundtrip: rustfmt 2026-12-04 12:28:25 +01:00
mnovak 7a6afed575 [fuzz] video_packetizer_roundtrip: arbitrary frames and parameters, packetize, lose up to m per block, depacketize equals input 2026-12-04 12:27:22 +01:00
mnovak 0d3a9a7917 [domistream] Audio packetizer: RTP datagram per Opus packet, AES-128-CBC (AudioCipher::encrypt), no parity until U16; first sequence must start a block 2026-12-04 12:24:45 +01:00
mnovak b62443ef28 [domistream] Video packetizer: frame header, FEC blocks with Cauchy parity over whole packets, sequence numbers, optional AES-GCM sealing (VideoCipher::encrypt) 2026-12-04 12:24:40 +01:00
mnovak e1abd7d060 [domistream] Audio packetizer: tests first (round trips through AudioDepacketizer, wrap-around, caps, fixed vectors), API stubs 2026-12-04 12:20:55 +01:00
mnovak 7983833ba6 [domistream] Video packetizer: tests first (round trips through VideoDepacketizer, loss up to and beyond m, fixed vectors), API stubs 2026-12-04 12:20:55 +01:00
mnovak 514565dbd7 [repo] Merge: docs/lumen-l0 (Lumen L0 results, PR #8) 2026-12-04 12:08:00 +01:00
mnovak 284bf7cc17 [repo] Docs: Lumen L0 results (licences, FP16 capture, NVENC API 12.0, timings); S-23 to S-25 2026-12-04 12:07:53 +01:00
mnovak e4fdca794b [repo] Merge: docs/lumen-decisions (Lumen decisions D1-D6 and the iOS phase, PR #7) 2026-12-04 11:55:55 +01:00
mnovak 73deb851ae [repo] Docs: Lumen decisions D1-D6 (Mark, 2026-12-04), iOS as a later client phase, OBS/FFmpeg forbidden for host work 2026-12-04 11:55:48 +01:00
mnovak 813a0ab8c4 [repo] Merge: docs/lumen-host-plan (Lumen host plan, PR #6) 2026-12-04 11:27:42 +01:00
mnovak 3794ed0e7f [repo] Docs: Lumen host plan (architecture, migration from Sunshine, milestones, risks, tests); S-22 Microsoft Learn sources 2026-12-04 11:27:20 +01:00
mnovak 89de3210be [repo] Merge: feature/probe (gs-probe and the live-interop run book, PR #5) 2026-11-30 11:02:20 +01:00
mnovak 3e09dbc09a [probe] U10 candidates from Moonshine: empty control bodies as defaults; run book P3/P4
Moonshine f184d5e (BSD-2, CLEAN_ROOM S-21) reads no body from START_B, PERIODIC_PING or the IDR request, ignores
LOSS_STATS and FRAME_STATS, does not know START_A (skipped inside the encrypted frame, fatal outside it), and stops a
stream after 60 s without a ping. No GPL-provenance value taken.

- Probe defaults: START_A and START_B empty, PERIODIC_PING empty every 500 ms, an empty IDR request on frame loss;
  every body stays overridable by hex or `none`.
- Tests: the candidates' plaintext headers, their sealed frame layout and Moonshine's client-to-host IV, and the
  INVALIDATE_REF_FRAMES field offsets Moonshine reads.
- PROTOCOL.md 3.3 and the U10 row narrowed with the [M] facts.
- LIVE-INTEROP.md: P3 decided (dev-only `sunshine-api` in arena-host behind a never-shipped feature, credentials from
  Custos), P4 done, table V rewritten without guessed bodies, first launch 90 s to outlast a 60 s ping deadline, the
  black-box list pointed at PLAY-REMOTELY's handover, §8 and §15 (§17 is the installer spec).
2026-11-30 11:01:41 +01:00
mnovak 07ccff4241 [probe] gs-probe: desktop GameStream probe client and the live interop run book
tools/gs-probe (own workspace, never published): `probe serverinfo | pair | apps | launch <app-id> | quit | unpair`
against one host address, driving DomiStream's pairing, HTTP, RTSP, ENet, control, video and audio state machines
over real sockets. Structured JSONL log per run (requests, answers, timings, the U each record bears on, parser
errors with their bytes), secrets redacted (rikey, pairing values; PIN never logged; registered key hex scrubbed from
every line). Test-only client key and cert in --out. Video: frames, decode-ready frames, FEC recoveries, losses,
elementary-stream dump, live U14 parity check; audio: packets, losses, decrypting vs plain receivers (U17), packet
dump and offline U16 solver (`solve-audio-fec`). START_A/START_B/PERIODIC_PING/IDR bodies come from the command line
(U10).

docs/LIVE-INTEROP.md: the sitting's run book (preparation, sequence S0-S5 with the U each step settles, variants,
log reading, where each fact lands in PROTOCOL.md and the code, stop-and-report rule, clean-up, Mark's timeline).

Built and unit-tested only (41 tests, clippy -D warnings, fmt); never run against a host.
2026-11-30 10:57:07 +01:00
mnovak a3c8cea7a6 [repo] Merge: docs/load-rule-2026-11-29 (load rule, PR #4) 2026-11-29 01:53:35 +01:00
mnovak beeb72cec8 [repo] Rules: drives at 95 %; the load gates builds and tests only (Mark, 2026-11-29) 2026-11-29 01:53:10 +01:00
mnovak c21e68565b [repo] Merge: feature/client (stream-v0.1.0, the GameStream client, PR #3) stream-v0.1.0 2026-11-26 04:01:43 +01:00
mnovak 66a6e98cf2 [repo] Release: stream-v0.1.0 status, handover 2026-11-26 04:01:15 +01:00
mnovak 8125949db2 [domistream] Tests: mutation pass, 24 of 24 caught
docs/MUTATION.md: each mandatory area's bug put back into src and caught by
its tests (parser caps off by one or removed for XML, RTSP, ENet, input,
video, audio; lying lengths; the ENet 0xFFFF wrap; the control replay
check; the nonce direction byte; ignored GCM tags, control and video; a
video parity index off by one; a rebuilt video shard's header trusted;
audio parity keyed by RTP sequence; a skipped pairing step; unchecked host
signatures; Instant::now and getrandom in src). No mutation survived, so no
test was added.

tools/mutation/mutate.py: the exact edits, so the pass can be rerun
through the resource gate.

Also: pairing_session fuzzed 10 min, 574 761 runs, no crash.
2026-11-26 03:59:58 +01:00
mnovak d62aa8f581 [domistream] Tests: closed XML depth bomb under the size cap
xml_depth_bomb_does_not_recurse: the closed half was 300 000 tag pairs
(2.1 MB), over MAX_XML_BYTES, so its `s.len() < MAX_XML_BYTES * 2` assert
failed and the depth check under it never ran (the protocol engineer was
right). Now 100 000 opens + 100 000 closes (about 0.7 MB): within the size
cap, it must be refused as TooLarge { max: MAX_XML_DEPTH }, without
recursion. The open-tags half is unchanged.
2026-11-26 03:53:14 +01:00
mnovak 6f13976ba5 [repo] Fuzz: lock file from the first full fuzz build 2026-11-26 03:47:20 +01:00
mnovak 61296102d1 [domistream] RTSP framer: collapse the Content-Length header check (clippy collapsible_if); clippy, fmt and doc clean 2026-11-26 03:12:17 +01:00
mnovak bd91a1007e [domistream] WIP: rustfmt, doc link, clippy fixes (one collapsible-if left in rtsp/mod.rs), PROTOCOL.md status
Paused at Mark's request.
2026-11-25 14:32:37 +01:00
mnovak 30a7b90034 [domistream] Implementation: HTTP, pairing, RTSP/SDP, ENet, control, input, RTP, FEC, video and audio receivers
Per PROTOCOL.md and the Wolf docs; interop with a real host is unverified. Strict, capped parsers throughout,
shared helpers in util.rs. Where PROTOCOL.md says UNKNOWN the Wolf-documented behaviour is used. The audio
receiver waits for the jitter budget before rebuilding a missing packet, so a late packet beats a rebuilt one.
2026-11-25 14:10:24 +01:00
mnovak 27b26a992b [domistream] Dependencies: rsa and x509-cert without default features (getrandom leaves the tree) 2026-11-25 14:10:23 +01:00
mnovak a939821124 [repo] Lab capture not run (Mark: continue without the check); ignore proptest regression files 2026-11-25 13:16:54 +01:00
mnovak 0f2edc66c9 [repo] Merge feature/lab: lab capture plan, relay tool, approved sources, U9/U14 from ENet and fec-rs 2026-11-25 13:16:40 +01:00
mnovak e67daea536 [domistream] Tests: properties cannot pass against Unimplemented
The never-panic properties (XML, RTSP, ENet, control, input, media) and the
allocation-cap checks only asserted inside `if let Ok`, so a stub returning
Unimplemented for everything passed them. Each now also requires the parser
to answer something other than Unimplemented (common::implemented); the XML
truncation property wants Malformed or Truncated, not any error.
2026-11-25 13:15:00 +01:00
mnovak 6c68a25b77 [repo] Lab capture: lab-install.ps1 (pinned MSI, loopback bind, one elevation) and lab-api.ps1 (pinned TLS, DPAPI credentials) 2026-11-25 13:08:46 +01:00
mnovak fd1c141ca8 [repo] Lab relay: compile fixes after the first build (clippy, fmt); 28 unit tests pass 2026-11-25 13:08:46 +01:00
mnovak 2740d3dd45 [domistream] Tests: first compile, clippy clean
Temporaries borrowed past their statement (control, media), clippy's
is_multiple_of, needless index loop and type complexity. input.rs: the
MOUSE_MOVE_ABS builder dropped the y field; the PROTOCOL.md cross-check would
have caught it at runtime.
2026-11-25 13:08:24 +01:00