From 24d51015f8fe8f9700f9eddaf5443697d1096cc7 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 10 Sep 2026 00:55:11 +0200 Subject: [PATCH] Ask for the unreliable video lane the test always wanted MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Video now opts into an unreliable media channel and audio states Reliable explicitly, rather than both inheriting a hardcoded default. `rudp_media_transport_options_follow_low_latency_profile` has asserted Unreliable since it was written and has never passed. It was not aspirational: CultNet hardcoded the media channel Reliable in both the profile builder and the send path, so Muninn had no way to express the intent. Muninn signalled it the only way available, by passing no reliable expiry — meaning "unreliable, so expiry is moot" — and got reliable delivery instead. Measured on Raven through `cultnet-impair`, 848-byte packets at 12 Mbps, which is Muninn's real shape: profile mode delivered clean unreliable 100.00% clean reliable 69.10% loss 1% unreliable 98.95% loss 1% reliable 72.00% loss 3% unreliable 96.73% loss 3% reliable 73.30% The reliable channel loses 31% of a clean 12 Mbps offer, and its delivery barely moves as loss rises, so loss was never the binding constraint — it cannot carry this rate at all. The unreliable channel holds every packet on a clean link and then degrades by roughly the loss injected, which is what a media lane should do. Reverse traffic differs by three orders of magnitude: 43 bytes of acknowledgement against ~135,000. An earlier draft of this message argued the defect was retransmission amplifying load under loss. The measurement does not support that mechanism. The conclusion survives it; the reasoning did not. Audio passes Reliable explicitly and does not change. That pairing is still wrong — 3 Mbps of uncompressed PCM does not belong on a reliable channel — but that is the Opus change, and inheriting the right value silently is what produced this bug. Requires CultLib's `claude/media-channel-delivery`. The dependency pin still points at c13b6ba and must be moved before this builds from a clean checkout. Co-Authored-By: Claude Opus 5 --- crates/muninn-daemon/src/main.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/crates/muninn-daemon/src/main.rs b/crates/muninn-daemon/src/main.rs index 6fed050..f085f8c 100644 --- a/crates/muninn-daemon/src/main.rs +++ b/crates/muninn-daemon/src/main.rs @@ -691,6 +691,7 @@ fn run_provider_command_ingress( ) -> Result<()> { let mut transport = CultNetRudpSocketTransportConnection::new(CultNetRudpSocketTransportOptions { + media_delivery: None, runtime_id: format!("muninn-{}-command-ingress", options.host_id), socket, mode: cultnet_rs::CultNetRudpSocketMode::Server, @@ -1944,6 +1945,7 @@ fn run_rudp_mux_once( node, MUNINN_MEDIA_RUDP_CONNECTION_ID, None, + cultnet_rs::CultNetTransportDelivery::Unreliable, "video", )?; let mut audio_transport = open_media_rudp_transport( @@ -1951,6 +1953,7 @@ fn run_rudp_mux_once( node, MUNINN_AUDIO_RUDP_CONNECTION_ID, Some(media_profile.receiver_assembly_deadline_ms), + cultnet_rs::CultNetTransportDelivery::Reliable, "audio", )?; publish_stream( @@ -2720,6 +2723,7 @@ fn open_media_rudp_transport( node: &mut cultmesh_rs::CultMeshNode, connection_id: u32, reliable_expire_after_ms: Option, + delivery: cultnet_rs::CultNetTransportDelivery, role: &str, ) -> Result { let media_profile = muninn_rudp_media_profile_for_options(options); @@ -2736,6 +2740,7 @@ fn open_media_rudp_transport( &media_profile, connection_id, reliable_expire_after_ms, + delivery, ))?; transport.connect(options.stream_id.as_bytes().to_vec())?; let deadline = Instant::now() + Duration::from_secs(5); @@ -2843,12 +2848,14 @@ fn muninn_media_rudp_options( media_profile: &MuninnRudpMediaProfile, connection_id: u32, reliable_expire_after_ms: Option, + delivery: cultnet_rs::CultNetTransportDelivery, ) -> CultNetRudpSocketTransportOptions { let mut options = CultNetRudpSocketTransportOptions::client("muninn-media", socket, endpoint, connection_id); options.resend_delay_ms = media_profile.sender_resend_delay_ms; options.max_fragment_bytes = Some(media_profile.max_fragment_bytes as u32); options.media_reliable_expire_after_ms = reliable_expire_after_ms; + options.media_delivery = Some(delivery); options } @@ -5778,6 +5785,7 @@ fn run_hid_controller_rudp_ingress( println!("Muninn HID controller RUDP stream listening at {local_addr}."); let mut transport = CultNetRudpSocketTransportConnection::new(CultNetRudpSocketTransportOptions { + media_delivery: None, runtime_id: "muninn-hid-controller-rudp".to_string(), socket, mode: cultnet_rs::CultNetRudpSocketMode::Server, @@ -6326,6 +6334,7 @@ fn create_hid_controller_stream(options: &Options) -> Result