feat: M3 seed — the lumen/1 native protocol: QUIC control plane + reference client (Phase 5)

The first end-to-end run of lumen's own protocol, past the GameStream compatibility layer.

- lumen-core/src/quic.rs (behind the `quic` feature): the lumen/1 handshake — Hello/Welcome/
  Start as length-prefixed LE binary on one QUIC bi-stream. Welcome carries the COMPLETE
  data-plane Config: mode, FEC scheme incl. GF(2^16) Leopard (inexpressible in GameStream),
  shard sizing, AES-GCM key + per-direction salt, data UDP port. Plus quinn endpoint helpers
  (self-signed server; accepts-any client — pinning lands with the trust model) and framed
  async IO. Round-trip unit-tested.
- lumen-host m3-host: serves one lumen/1 session — QUIC handshake, then a NATIVE thread
  (no async on the frame path — design invariant) streams deterministic 64KB test frames
  through the hardened M1 Session over UdpTransport.
- lumen-client-rs: from scaffold to working reference client — connects, negotiates, brings
  up the client Session over UDP, reassembles + FEC-recovers + byte-verifies every frame.

VALIDATED END-TO-END on localhost: 300/300 frames verified, 0 mismatches, through
QUIC-negotiated GF(2^16) FEC + AES-GCM over real UDP sockets. M4 (decode+present) builds on
this exact client skeleton.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-09 23:33:40 +00:00
parent 1eeb35a723
commit de3123038f
10 changed files with 621 additions and 14 deletions
+17
View File
@@ -19,6 +19,7 @@ mod encode;
mod gamestream;
mod inject;
mod m0;
mod m3;
mod pipeline;
mod pwinit;
mod vdisplay;
@@ -59,6 +60,22 @@ fn real_main() -> Result<()> {
Some("zerocopy-probe") => zerocopy::probe(),
// M0 pipeline spike.
Some("m0") => m0::run(parse_m0(&args[1..])?),
// M3 seed: native lumen/1 host (QUIC control plane + UDP data plane).
Some("m3-host") => {
let port = args
.iter()
.skip_while(|a| *a != "--port")
.nth(1)
.and_then(|s| s.parse().ok())
.unwrap_or(9777);
let frames = args
.iter()
.skip_while(|a| *a != "--frames")
.nth(1)
.and_then(|s| s.parse().ok())
.unwrap_or(300);
m3::run(port, frames)
}
Some("-h") | Some("--help") | Some("help") | None => {
print_usage();
Ok(())