diff --git a/crates/domistream/tests/control.rs b/crates/domistream/tests/control.rs index 71e2095..094c8f4 100644 --- a/crates/domistream/tests/control.rs +++ b/crates/domistream/tests/control.rs @@ -381,11 +381,18 @@ fn client_messages() { encode_client_message(&ClientMessage::Input(ev.clone())).unwrap(), domistream::input::encode_input(&ev).unwrap() ); - // Bodies still UNKNOWN (U10) are refused rather than guessed. - for m in [ClientMessage::StartA, ClientMessage::StartB, ClientMessage::PeriodicPing, ClientMessage::RequestIdrFrame] - { - assert_err!(encode_client_message(&m), Error::Unsupported { .. }, "{m:?}"); + // START_B, PERIODIC_PING and the IDR request go with an empty body (PROTOCOL.md 3.3: what Moonshine and Lumen + // read; the lead's decision of 2026-12-04). START_A's body is still UNKNOWN (U10) and stays refused. + for (m, t) in [ + (ClientMessage::StartB, 0x0307u16), + (ClientMessage::PeriodicPing, 0x0200), + (ClientMessage::RequestIdrFrame, 0x0302), + ] { + let mut want = t.to_le_bytes().to_vec(); + want.extend_from_slice(&0u16.to_le_bytes()); + assert_eq!(encode_client_message(&m).unwrap(), want, "{m:?}"); } + assert_err!(encode_client_message(&ClientMessage::StartA), Error::Unsupported { .. }); } proptest! { diff --git a/crates/domistream/tests/session.rs b/crates/domistream/tests/session.rs index 259f569..6d2c70b 100644 --- a/crates/domistream/tests/session.rs +++ b/crates/domistream/tests/session.rs @@ -623,8 +623,9 @@ fn a_whole_session_between_our_client_and_our_host() { (launched.mode.width, launched.mode.height, launched.mode.fps) ); - // ENet connect on the control port, then START_B. ControlStream refuses START_B (body U10), hence the probe path. - assert_err!(encode_client_message(&ClientMessage::StartB), Error::Unsupported { .. }); + // ENet connect on the control port, then START_B. ControlStream sends START_B with an empty body (3.3); the + // session below drives the same bytes over EnetClient + ControlCipher, as gs-probe does. + assert_eq!(encode_client_message(&ClientMessage::StartB).unwrap(), vec![0x07, 0x03, 0x00, 0x00]); let host_control = HostControl { config: ControlHostConfig { enet: EnetHostConfig {