diff --git a/quest/m1/README.md b/quest/m1/README.md index 25c59174d55..80e8fb4f117 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -46,7 +46,6 @@ ladders. - [Publishing never invents a timestamp](/quest/m1/publish-timestamp.md) - no Rust or binding publish API fills in a timestamp; an untimed payload goes out untimed - [Hard fork](/quest/m1/quic/fork/README.md) - quinn hard-forked in-tree as `moq-quic`, ranked ahead of perf; the rest of the QUIC line follows it - [Cluster routing](/quest/m1/cluster-routing/README.md) - any node routes toward a broadcast's origin over CDN and P2P links alike, with per-origin routes and path-less announces -- [Track tail interop](/quest/m1/track-tail-interop.md) - a Rust publisher ending a track with a group in flight is read to its end by the JS subscriber, and the reverse, in `just test interop` - [Flat questlines](/quest/m1/quest-flat-lines.md) - moq pins the current quest CLI, lands its questline branches on main, and retires them - [main merges through a squash queue](/quest/m1/merge-queue-settings.md) - condition: the maintainer enables the squash merge queue on `main` - [Binding audio delay](/quest/m1/binding-surface.md) - moq-ffi and every wrapper configure and observe audio playout delay diff --git a/quest/m1/js-pending-tail.md b/quest/m1/js-pending-tail.md index 195259477ee..fcd08a6d6ca 100644 --- a/quest/m1/js-pending-tail.md +++ b/quest/m1/js-pending-tail.md @@ -3,22 +3,17 @@ ## Goal A `@moq/net` reader of a received track waits for missing groups below a -declared end until the tail settles, as Rust readers do once #4225 lands, +declared end until the tail settles, as Rust readers do since #4225, instead of ending at the end with groups missing (`doc/lib/js/net.md`). ## Plan -Mirror the Rust hold from [Track tail interop](/quest/m1/track-tail-interop.md) -(#4225) once it merges, and test it against the Rust behavior with mocked -time. Split from [JS session parity](/quest/m1/js-session-parity.md) on +Mirror the Rust pending-tail hold from #4225 (`rs/moq-net/src/model/track.rs`) +and test it against the Rust behavior with mocked time. Split from [JS session parity](/quest/m1/js-session-parity.md) on 2026-10-08 so the caps work stays ready. Public API: none. Wire: none. -## Required - -- [Track tail interop](/quest/m1/track-tail-interop.md) - the Rust hold this mirrors - ## Related - [JS session parity](/quest/m1/js-session-parity.md) - per-session caps, the other half diff --git a/quest/m1/subscribe-drop.md b/quest/m1/subscribe-drop.md index 39384ba36d5..78263dc676f 100644 --- a/quest/m1/subscribe-drop.md +++ b/quest/m1/subscribe-drop.md @@ -81,14 +81,9 @@ its header; on each version the subscriber settles without waiting out the grace. A skipped sequence at the end is covered on lite-05 through lite-07 (`track_tail::skipped_groups_end_without_the_grace`). -Add the lite-07 drop case to the tail interop harness from -[track tail interop](/quest/m1/track-tail-interop.md): Rust and JS +Add the lite-07 drop case to the tail interop harness +(`just test interop --tail`, `test/interop/clients/*/tail.*`): Rust and JS subscribers both settle on SUBSCRIBE_DROP through the relay, so a group the publisher skipped or never opened ends the track without waiting out the grace. Decided in the 2026-09-30 audit: the case moved here so the basic tail interop could land first. - - -## Related - -- [Track tail interop](/quest/m1/track-tail-interop.md) - the Rust-JS tail harness the lite-07 drop case extends diff --git a/quest/m1/track-tail-interop.md b/quest/m1/track-tail-interop.md deleted file mode 100644 index a3e8755b983..00000000000 --- a/quest/m1/track-tail-interop.md +++ /dev/null @@ -1,47 +0,0 @@ -# [S] Track tail interop - -## Goal - -`just test interop` covers a publisher that ends a track while its last group -is still in flight: a Rust publisher's track is read to its declared end by the -JS subscriber, and a JS publisher's by the Rust subscriber, through the relay. -Each reader gets every group below the end and then a clean end, never an -error or a stall. - -## Plan - -Both moq-net and `@moq/net` wait for a track's tail once the publisher ends a -subscription, and each is covered by its own in-process tests. Nothing checks -that the two agree across a relay on real QUIC. - -What stood in the way when the Rust half landed: - -- `moq import` exiting the moment stdin ends is cleared: since #4430 a - graceful close delivers finished tracks at stdin EOF. -- The native JS subscriber (`test/interop/clients/js-native`) returns on the - first frame. It needs a mode that reads a track to its end and reports how it - ended and which groups it saw. - -The harness exposed a relay start-floor defect: when a newer group arrives -first, earlier in-flight groups can be lost. #4387 (merged 09-28) fixed that -case, but the tail lanes still fail on this quest's PR #4225 after it: Interop -run 37139033242 (2026-10-03) failed `tail rust -> rust`, `rust -> -js-native-node`, and `rust -> js-native-bun`. Merge `main` (after #4741 and -#4813) into #4225, rerun, and record here whatever defect still fails. - -Found 2026-10-08: #4225's `go -> *` lanes fail on a stall where the go -publisher's serve loop starves its own QUIC driver until the relay times it -out. The serve budgets (`kio::coop::Budget`) are meant to fix it; rerun the -lanes. - -Decided in the 2026-09-30 audit: the lite-07 drop case moved into -[SUBSCRIBE_DROP](/quest/m1/subscribe-drop.md)'s tests, so the basic Rust and -JS tail interop lands now instead of waiting on that [L] quest. - -QUIC on localhost rarely reorders, so this is a smoke check that the end is -delivered and clean. The ordering race itself stays in the unit tests. - -## Related - -- [SUBSCRIBE_DROP](/quest/m1/subscribe-drop.md) - owns the lite-07 drop case on top of this harness -- [Reliable stream reset](/quest/m1/quic/reliable-reset.md) - keeps a reset stream's header, so the reset acts as a one-group drop diff --git a/rs/moq-cli/Cargo.toml b/rs/moq-cli/Cargo.toml index 5e667ff564b..cb25037a012 100644 --- a/rs/moq-cli/Cargo.toml +++ b/rs/moq-cli/Cargo.toml @@ -154,3 +154,7 @@ vt100 = "0.16.2" [[bench]] name = "play_buffer" harness = false + +[[example]] +name = "interop-tail" +path = "../../test/interop/clients/rust/tail.rs" diff --git a/rs/moq-net/src/ietf/subscriber.rs b/rs/moq-net/src/ietf/subscriber.rs index 8e74b901730..3584105058d 100644 --- a/rs/moq-net/src/ietf/subscriber.rs +++ b/rs/moq-net/src/ietf/subscriber.rs @@ -2371,6 +2371,8 @@ where fill.end(); } } + // The tail settled, so readers may end at an END_OF_TRACK's boundary. + track.set_tail_pending(false); // A no-op once an END_OF_TRACK declared the end. let _ = track.finish(); } @@ -3082,7 +3084,8 @@ fn end_track(track: &mut track::Producer, end: u64) -> Result<(), Error> { if track.final_sequence().is_some() { return Ok(()); } - if let Err(err) = track.finish_at(end) { + // Lower groups may still be on the wire, behind the one that carried the end. + if let Err(err) = track.finish_at_pending(end) { tracing::warn!(%err, end, "invalid END_OF_TRACK"); let _ = track.clone().abort(Error::ProtocolViolation); return Err(Error::ProtocolViolation); diff --git a/rs/moq-net/src/lite/publisher.rs b/rs/moq-net/src/lite/publisher.rs index 2fc9d48cf23..0bc24118f7f 100644 --- a/rs/moq-net/src/lite/publisher.rs +++ b/rs/moq-net/src/lite/publisher.rs @@ -1827,7 +1827,13 @@ enum SubscribeServe { /// is moved on every transition. Run(Box>), /// The track finished: draining the in-flight group streams before the FIN. - Drain { children: kio::Tasks> }, + Drain { + children: kio::Tasks>, + /// The subscription's demand lasts until its groups drain. A relay cancels its + /// upstream subscription once nobody subscribes, and the publisher then resets + /// every group still on the wire. `None` only in passing between states. + _track: Option>, + }, } impl Request for SubscribeServe { @@ -1893,6 +1899,7 @@ impl Request for SubscribeServe { self, Self::Drain { children: Default::default(), + _track: None, }, ) else { @@ -1958,10 +1965,22 @@ impl Request for SubscribeServe { if ready!(run.poll_step(writer, waiter))?.is_continue() { return Poll::Ready(Ok(ControlFlow::Continue(()))); } - let children = std::mem::take(&mut run.children); - *self = Self::Drain { children }; + let Self::Run(run) = std::mem::replace( + self, + Self::Drain { + children: Default::default(), + _track: None, + }, + ) else { + unreachable!() + }; + let TrackRun { children, track, .. } = *run; + *self = Self::Drain { + children, + _track: Some(Box::new(track)), + }; } - Self::Drain { children } => { + Self::Drain { children, .. } => { ready!(children.poll(waiter)); return Poll::Ready(Ok(ControlFlow::Break(()))); } diff --git a/rs/moq-net/src/lite/subscriber.rs b/rs/moq-net/src/lite/subscriber.rs index 83ba112e3c0..e0a184b3d57 100644 --- a/rs/moq-net/src/lite/subscriber.rs +++ b/rs/moq-net/src/lite/subscriber.rs @@ -4515,6 +4515,7 @@ impl kio::Task for TrackServeRun { } }, ServeEnd::Finished => { + serve_loop.serving.set_tail_pending(false); let _ = serve_loop.serving.finish(); } ServeEnd::GiveBack(err) => { @@ -4870,13 +4871,15 @@ impl ServeLoop { // consumers learn the boundary early; the later stream FIN // then finds the track already finished. lite::SubscribeResponse::End(end) => { - // finish_at rejects a boundary at or below a group + // Lower groups may still be on the wire, behind a higher + // one, so the end holds readers at a hole until the tail + // settles. finish_at rejects a boundary at or below a group // already received. lite-05 specified an inclusive end, // and `@moq/net` 0.1.3 to 0.1.9 sent one, so there it // only costs the early boundary: warn, and let the FIN // finish the track. Later drafts made it exclusive, so // the publisher contradicted its own end. - if let Err(err) = self.serving.finish_at(end.group) { + if let Err(err) = self.serving.finish_at_pending(end.group) { match serve.subscriber.version { Version::Lite05 => { tracing::warn!(track = %serve.name, group = end.group, %err, "invalid subscribe end") diff --git a/rs/moq-net/src/model/track.rs b/rs/moq-net/src/model/track.rs index 7577281041d..7e7d047309a 100644 --- a/rs/moq-net/src/model/track.rs +++ b/rs/moq-net/src/model/track.rs @@ -284,6 +284,11 @@ pub(crate) struct TrackState { // or the receiving session closed locally without declaring an end. sealed: bool, + // A wire subscription declared the end ahead of the group streams below it, which + // QUIC may deliver in any order: readers wait for its tail to settle, or for the + // last producer to go, rather than end at the boundary with groups still to arrive. + tail_pending: bool, + // No producer remains (aborted, sealed, or dropped), so nothing protects the live // edge any longer: the pool's idle expiry reclaims it like every other group, and a // stale consumer cannot pin the cache. @@ -1398,12 +1403,17 @@ impl TrackState { // `sealed` also ends a locally closed receive track without a declared end. // An abort still wins unless that end had already settled: a group below it was still open. let reached = self.sealed - || self.final_sequence.is_some_and(|fin| { - self.max_sequence.map_or(0, |max| max.saturating_add(1)) >= fin && !self.withholds(fin) - }); + || self + .final_sequence + .is_some_and(|fin| self.edge() >= fin && !self.withholds(fin) && !self.awaits_tail(fin)); reached && (self.abort.is_none() || self.settled) } + /// One past the highest sequence produced: where the live edge stands against the end. + fn edge(&self) -> u64 { + self.max_sequence.map_or(0, |max| max.saturating_add(1)) + } + /// Whether a group below `fin` is still withheld from readers until its first frame /// lands (see [`Producer::receive_group`]): the end is not reached before it shows, or /// readers would end without it. @@ -1411,13 +1421,45 @@ impl TrackState { self.lookup.range(..fin).any(|(_, slot)| slot.pending) } + /// Whether a group below `fin` the wire subscription still owes has yet to arrive: + /// a sequence from where the feed starts up to the end with nothing cached. Only + /// such a hole holds readers, so a tail with nothing missing ends them at once. + /// + /// Judged by the cache, so an evicted group or a datagram also reads as a hole until + /// the session settles the tail. That only delays the end: an abort stops the wait. + fn awaits_tail(&self, fin: u64) -> bool { + // Nothing arrives after an abort, so a hole left then is final. + if !self.tail_pending || self.abort.is_some() { + return false; + } + // Fetched backfill never reaches a reader in arrival order, so only the live feed's + // groups count. Without a declared start, the lowest one stands in for it. + let floor = match self.start_sequence { + Some(start) => start, + None if self.start_pending => return true, + None => match self.lookup.iter().find(|(_, slot)| slot.visible) { + Some((&first, _)) => first, + None => return fin > 0, + }, + } + .min(fin); + let arrived = self.lookup.range(floor..fin).filter(|(_, slot)| slot.visible).count(); + (arrived as u64) < fin - floor + } + /// Whether the declared end is reached and every cached group below it finished, /// so nothing the end promised is still in flight. + /// + /// Decided as an abort lands, which ends any wait for the tail: a hole the cache + /// cannot tell from an evicted group does not turn a delivered track into a failure. fn is_settled(&self) -> bool { let Some(fin) = self.final_sequence else { return false; }; - self.is_complete() && self.lookup.range(..fin).all(|(_, slot)| slot.group.is_finished()) + let reached = self.sealed || self.edge() >= fin; + reached + && (self.abort.is_none() || self.settled) + && self.lookup.range(..fin).all(|(_, slot)| slot.group.is_finished()) } /// Where a replacement route should pick this track up: one past the last frame @@ -1930,6 +1972,31 @@ impl Producer { self.modify()?.set_final(final_sequence) } + /// [`Self::finish_at`] for a wire subscription that may still owe groups below the end. + /// + /// The boundary and the pending tail land in one write: a reader that saw the end + /// without the tail would end at a hole the wire is still filling. + pub(crate) fn finish_at_pending(&mut self, final_sequence: u64) -> Result<()> { + let mut state = self.modify()?; + state.set_final(final_sequence)?; + state.tail_pending = true; + Ok(()) + } + + /// Whether a wire subscription still owes group streams below the declared end. + /// + /// While pending, readers do not end at the boundary: a lower group's stream may + /// arrive after a higher one. The session clears it once its tail settles; the last + /// producer going ends readers regardless. + pub(crate) fn set_tail_pending(&self, pending: bool) { + if self.state.read().tail_pending == pending { + return; + } + if let Ok(mut state) = self.modify() { + state.tail_pending = pending; + } + } + /// Declare the first group the live feed serves (the wire's SUBSCRIBE_START, /// or the start the subscription itself requested): groups below `sequence` /// are not waited for, so a reader waiting for one fails over instead of @@ -7740,6 +7807,116 @@ mod test { )); } + /// A wire subscription's pending tail holds readers at a hole below the end, since a + /// lower group's stream may arrive after a higher one, until the hole fills or the tail + /// settles. The last producer going ends them regardless. + #[moq_net_sim::test] + async fn a_pending_tail_holds_readers_at_a_hole() { + let mut producer = track_producer("test", None); + let mut arrival = producer.subscribe(None); + // The wire declares where the feed starts. + producer.start_at(0).unwrap(); + producer.finish_at_pending(3).unwrap(); + let _high = producer.create_group(group::Info { sequence: 2 }).unwrap(); + assert_eq!(arrival.assert_group().sequence, 2); + assert!(arrival.recv_group().now_or_never().is_none(), "held at the hole"); + + // The late lower groups are delivered, then the full tail ends the reader. + let _low = producer.create_group(group::Info { sequence: 0 }).unwrap(); + assert_eq!(arrival.assert_group().sequence, 0); + assert!(arrival.recv_group().now_or_never().is_none(), "group 1 is still owed"); + let _mid = producer.create_group(group::Info { sequence: 1 }).unwrap(); + assert_eq!(arrival.assert_group().sequence, 1); + assert!(arrival.recv_group().now_or_never().unwrap().unwrap().is_none()); + + // A settled tail ends readers at the boundary, hole and all. + let mut producer = track_producer("test", None); + let mut arrival = producer.subscribe(None); + producer.start_at(0).unwrap(); + producer.finish_at_pending(2).unwrap(); + let _high = producer.create_group(group::Info { sequence: 1 }).unwrap(); + assert_eq!(arrival.assert_group().sequence, 1); + assert!(arrival.recv_group().now_or_never().is_none()); + producer.set_tail_pending(false); + assert!(arrival.recv_group().now_or_never().unwrap().unwrap().is_none()); + + // So does the last producer going. + let mut producer = track_producer("test", None); + let mut arrival = producer.subscribe(None); + producer.start_at(0).unwrap(); + producer.finish_at_pending(2).unwrap(); + let _high = producer.create_group(group::Info { sequence: 1 }).unwrap(); + assert_eq!(arrival.assert_group().sequence, 1); + drop(producer); + assert!(arrival.recv_group().now_or_never().unwrap().unwrap().is_none()); + } + + /// A fetched copy of a group the live feed still owes never reaches an arrival-order + /// reader, so it does not fill the hole: the reader waits for the live group. + #[moq_net_sim::test] + async fn a_fetched_group_does_not_fill_a_pending_tail() { + let mut producer = track_producer("test", None); + let dynamic = producer.dynamic(); + let consumer = producer.consume(); + let mut arrival = producer.subscribe(None); + producer.start_at(0).unwrap(); + producer.finish_at_pending(2).unwrap(); + let _high = producer.create_group(group::Info { sequence: 1 }).unwrap(); + assert_eq!(arrival.assert_group().sequence, 1); + + let _pending = consumer.fetch_group(0, None); + let req = dynamic.requested_group().now_or_never().unwrap().unwrap(); + req.accept(None).unwrap().finish().unwrap(); + assert!( + arrival.recv_group().now_or_never().is_none(), + "the live group 0 is still owed" + ); + } + + /// An abort ends the wait for a pending tail. Whatever reached the end finished, so + /// readers end cleanly: the cache cannot tell a hole from a group it already evicted. + #[moq_net_sim::test] + async fn an_abort_ends_a_pending_tail_cleanly() { + let mut producer = track_producer("test", None); + let mut arrival = producer.subscribe(None); + producer.start_at(0).unwrap(); + producer.finish_at_pending(2).unwrap(); + let high = producer.create_group(group::Info { sequence: 1 }).unwrap(); + high.finish().unwrap(); + assert_eq!(arrival.assert_group().sequence, 1); + assert!(arrival.recv_group().now_or_never().is_none(), "held at the hole"); + + producer.abort(Error::Dropped).unwrap(); + assert!(arrival.recv_group().now_or_never().unwrap().unwrap().is_none()); + } + + /// The wire's end can land after the highest group, with lower groups still owed. A + /// reader already past that group stays held at the hole: the end never shows without + /// its pending tail. + #[moq_net_sim::test] + async fn an_end_after_the_highest_group_holds_the_reader() { + let mut producer = track_producer("test", None); + let mut arrival = producer.subscribe(None); + producer.start_at(0).unwrap(); + let _high = producer.create_group(group::Info { sequence: 2 }).unwrap(); + assert_eq!(arrival.assert_group().sequence, 2); + assert!(arrival.recv_group().now_or_never().is_none()); + + producer.finish_at_pending(3).unwrap(); + assert!(arrival.recv_group().now_or_never().is_none(), "held at the hole"); + assert!( + matches!(producer.finish_at_pending(2), Err(Error::Closed)), + "a second end is refused" + ); + assert_eq!(producer.final_sequence(), Some(3), "the first end stands"); + + for sequence in [0, 1] { + let _low = producer.create_group(group::Info { sequence }).unwrap(); + assert_eq!(arrival.assert_group().sequence, sequence); + } + assert!(arrival.recv_group().now_or_never().unwrap().unwrap().is_none()); + } + /// An abort before the declared end settled wins over it: the boundary was reached, /// but a group below it was still open, so the track was cut off rather than ended. #[test] diff --git a/rs/moq-net/tests/finite_relay.rs b/rs/moq-net/tests/finite_relay.rs new file mode 100644 index 00000000000..c42cbf20033 --- /dev/null +++ b/rs/moq-net/tests/finite_relay.rs @@ -0,0 +1,213 @@ +//! A finite track read through a relay: every group below the declared end, then a clean +//! end, even when the relay's subscriber reaches the end before the groups finish. +//! +//! The relay's downstream subscription sees the declared end as soon as every group below +//! it has opened, while their payloads are still crossing the upstream hop. Its demand must +//! last until those groups drain: a relay cancels its upstream subscription once nobody +//! subscribes, and the publisher then resets every group still on the wire. + +mod support; + +use std::time::Duration; + +use futures::channel::mpsc::TryRecvError; +use futures::{SinkExt, StreamExt}; + +use moq_net::track::Subscription; +use moq_net::{Hop, Timestamp, Version}; +use support::harness::{MockConnectOptions, connect_mock}; + +const TIMEOUT: Duration = Duration::from_secs(10); +const MAX_DELAY: Duration = Duration::from_secs(5); +const GROUPS: u64 = 4; + +const VERSIONS: &[&str] = &[ + "moq-lite-03", + "moq-lite-05", + "moq-lite-06", + "moq-lite-07-wip", + "moq-transport-14", + "moq-transport-17", + "moq-transport-22", +]; + +fn produce_origin(hop: u64) -> moq_net::origin::Producer { + let (producer, driver) = moq_net::origin::Producer::new(moq_net::origin::Config::new(Hop::new(hop).unwrap())); + support::harness::spawn(driver); + producer +} + +/// How the publisher's groups reach the relay. +#[derive(Clone, Copy)] +enum Arrival { + /// Each group's header arrives in order, but its last frame is held until the end has + /// reached the subscriber. + HeldTails, + /// Every group is written whole, but the newest group's stream reaches the relay + /// before the others, after the end: QUIC does not order streams. + NewestFirst, +} + +/// Publish groups 0..4 through a relay, delivered as `arrival` says, and return the +/// groups the subscriber read whole and how its subscription ended. +async fn round(name: &str, arrival: Arrival) -> (Vec, Result<(), moq_net::Error>) { + let version: Version = name.parse().unwrap(); + let publisher = produce_origin(1); + let broadcast = publisher.create_broadcast("bcast").unwrap(); + let mut track = broadcast.create_track("tail", None).unwrap(); + broadcast.announce(Default::default()).unwrap(); + + let relay = produce_origin(2); + let mut options = MockConnectOptions::new(version); + options.server_publish = Some(publisher.consume()); + options.client_subscribe = Some(relay.clone()); + let upstream = connect_mock(options).await; + + let subscriber = produce_origin(3); + let mut options = MockConnectOptions::new(version); + options.server_publish = Some(relay.consume()); + options.client_subscribe = Some(subscriber.clone()); + let downstream = connect_mock(options).await; + + let consumer = subscriber.consume(); + moq_net_sim::timeout(TIMEOUT, consumer.routed("bcast")) + .await + .expect("announce timeout") + .expect("routed"); + let remote = moq_net_sim::timeout(TIMEOUT, consumer.request_broadcast("bcast", None)) + .await + .expect("resolve timeout") + .expect("broadcast resolves"); + + let (mut heads, mut opened) = futures::channel::mpsc::unbounded(); + let reader = moq_net_sim::spawn(async move { + let subscription = Subscription::default().with_max_delay(MAX_DELAY).with_groups(0..); + let mut sub = remote + .track("tail") + .unwrap() + .subscribe(subscription) + .await + .expect("subscribe"); + let mut tails = Vec::new(); + let end = loop { + let mut group = match sub.recv_group().await { + Ok(Some(group)) => group, + Ok(None) => break Ok(()), + Err(err) => break Err(err), + }; + // A failed head ends the read with its error, which the main task reports. + let head = match group.read_frame().await { + Ok(head) => head.expect("head frame"), + Err(err) => break Err(err), + }; + assert_eq!(&head.payload[..], b"head"); + heads.send(group.sequence).await.unwrap(); + tails.push(moq_net_sim::spawn(async move { + let tail = group.read_frame().await?.expect("tail frame"); + assert_eq!(&tail.payload[..], b"tail"); + assert!(group.read_frame().await?.is_none(), "extra frame"); + Ok::<_, moq_net::Error>(group.sequence) + })); + }; + let mut seen = Vec::new(); + for tail in tails { + match tail.await.expect("tail reader panicked") { + Ok(sequence) => seen.push(sequence), + Err(err) => return (seen, Err(err)), + } + } + seen.sort(); + (seen, end) + }); + + moq_net_sim::timeout(TIMEOUT, track.demand().used()) + .await + .expect("no subscriber appeared") + .unwrap(); + track.finish_at(GROUPS).unwrap(); + match arrival { + Arrival::HeldTails => { + let mut groups = Vec::new(); + for sequence in 0..GROUPS { + let mut group = track.append_group().unwrap(); + group.write_frame(Timestamp::ZERO, &b"head"[..]).unwrap(); + groups.push(group); + // IETF requests the live edge, so observe each header before advancing it. + match moq_net_sim::timeout(TIMEOUT, opened.next()) + .await + .expect("head timeout") + { + Some(head) => assert_eq!(head, sequence, "{name}"), + None => panic!("{name}: the reader stopped: {:?}", reader.await), + } + } + + // Simulated time advances only once every task is idle: each group has reached + // the subscriber, so the relay's downstream subscription has seen the end. + moq_net_sim::sleep(Duration::from_millis(100)).await; + for mut group in groups { + group.write_frame(Timestamp::ZERO, &b"tail"[..]).unwrap(); + group.finish().unwrap(); + } + } + Arrival::NewestFirst => { + upstream.server_transport.hold_unis(); + for _ in 0..GROUPS { + let mut group = track.append_group().unwrap(); + group.write_frame(Timestamp::ZERO, &b"head"[..]).unwrap(); + group.write_frame(Timestamp::ZERO, &b"tail"[..]).unwrap(); + group.finish().unwrap(); + // IETF serves from the live edge, so let each group open its stream before + // the next one supersedes it. + moq_net_sim::sleep(Duration::from_millis(10)).await; + } + + // Once idle, the publisher has opened every stream and ended the subscription, + // so the relay knows the end before any group arrives. + moq_net_sim::sleep(Duration::from_millis(100)).await; + // Deliver streams newest first (IETF also carries the end on a stream of its + // own) until the last group reaches the subscriber, at the declared boundary. + let newest = loop { + let held = upstream.server_transport.release_newest_uni(); + moq_net_sim::sleep(Duration::from_millis(10)).await; + match opened.try_recv() { + Ok(head) => break head, + Err(TryRecvError::Closed) => panic!("{name}: the reader stopped: {:?}", reader.await), + Err(TryRecvError::Empty) => {} + } + assert!(held > 0, "{name}: no group reached the subscriber"); + }; + assert_eq!(newest, GROUPS - 1, "{name}"); + moq_net_sim::sleep(Duration::from_millis(100)).await; + upstream.server_transport.release_unis(); + } + } + + // Lite03 carries no declared end: each of the two hops waits one max-delay grace. + let outcome = moq_net_sim::timeout(MAX_DELAY * 2 + TIMEOUT, reader) + .await + .unwrap_or_else(|_| panic!("{name}: the track never ended")) + .expect("reader panicked"); + drop((track, broadcast, upstream, downstream, publisher, relay, subscriber)); + outcome +} + +#[moq_net_sim::test] +async fn relay_keeps_groups_in_flight_past_the_end() { + for version in VERSIONS { + let (seen, end) = round(version, Arrival::HeldTails).await; + assert_eq!(seen, [0, 1, 2, 3], "{version}: end={end:?}"); + assert!(end.is_ok(), "{version}: ended with {end:?}"); + } +} + +/// The relay learns the end, then receives the last group's stream before the others: it +/// keeps serving until the upstream tail settles instead of ending at the boundary. +#[moq_net_sim::test] +async fn relay_waits_for_reordered_upstream_headers() { + for version in VERSIONS { + let (seen, end) = round(version, Arrival::NewestFirst).await; + assert_eq!(seen, [0, 1, 2, 3], "{version}: end={end:?}"); + assert!(end.is_ok(), "{version}: ended with {end:?}"); + } +} diff --git a/rs/moq-net/tests/support/mock.rs b/rs/moq-net/tests/support/mock.rs index deeebe27441..71a872f3b1c 100644 --- a/rs/moq-net/tests/support/mock.rs +++ b/rs/moq-net/tests/support/mock.rs @@ -665,6 +665,17 @@ impl MockSession { } } + /// Deliver only the newest held uni stream, and keep holding the rest. Returns how + /// many are still held. + pub fn release_newest_uni(&self) -> usize { + let mut held = self.side.held.lock().unwrap(); + let held = held.as_mut().expect("not holding"); + if let Some(stream) = held.pop() { + let _ = self.side.peer_uni.try_push(stream); + } + held.len() + } + /// Deliver the held uni streams newest first, and stop holding. pub fn release_unis_reversed(&self) { for stream in self diff --git a/rs/moq-net/tests/track_tail.rs b/rs/moq-net/tests/track_tail.rs index c04018188e1..e1b28cd3707 100644 --- a/rs/moq-net/tests/track_tail.rs +++ b/rs/moq-net/tests/track_tail.rs @@ -309,12 +309,13 @@ async fn ietf_leaving_cancels_a_blocked_end_of_track() { } } -/// A lost datagram is not owed. Nothing tells the subscriber its sequence was a datagram, so -/// on the drafts that account for the owed range its hole keeps the subscription routable for -/// the grace, like a stream reset before its header. A reader never waits on it: the track -/// ends for readers once the live edge reaches the declared end. +/// A lost datagram is not owed, but nothing tells a lite-05 or lite-06 subscriber its +/// sequence was a datagram rather than a group stream still on its way. Its hole holds +/// the subscription, and its readers, for the grace, like a stream reset before its +/// header: ending at once would drop a reordered group. Lite-07 counts the streams, so a +/// lost datagram never delays its end. #[moq_net_sim::test] -async fn a_lost_datagram_never_delays_the_end() { +async fn a_lost_datagram_delays_the_end_only_without_a_stream_count() { for version in ["moq-lite-05", "moq-lite-07-wip"] { let Pair { pair, @@ -361,7 +362,13 @@ async fn a_lost_datagram_never_delays_the_end() { .expect("reader panicked"); assert_eq!(groups, [0, 2], "{version}"); let elapsed = ended - finished; - assert!(elapsed < GRACE / 10, "{version}: ended after {elapsed:?}"); + match version { + "moq-lite-07-wip" => assert!(elapsed < GRACE / 10, "{version}: ended after {elapsed:?}"), + _ => assert!( + (GRACE / 2..GRACE * 2).contains(&elapsed), + "{version}: ended after {elapsed:?}" + ), + } drop((pair, _keep)); } } diff --git a/test/interop/README.md b/test/interop/README.md index 53eb46eb3d1..cc276caad37 100644 --- a/test/interop/README.md +++ b/test/interop/README.md @@ -19,6 +19,18 @@ subscriber checks end-to-end: the browser encodes fake microphone audio, and the Python, Go, and C++ clients encode a synthetic tone through `moq-ffi` at a 2.5 ms frame duration, so the matrix covers the FFI audio path with a non-default codec config. +The normal run also checks a finite raw track through the relay. Its publisher +announces end 4 before writing four 256 KiB groups; the reader verifies every byte, +exactly groups 0 through 3, and a clean end at 4. Rust-to-Rust always runs. Selecting +native JS adds both Rust-to-JS and JS-to-Rust under that runtime, so `--all` covers +Node and Bun. `--tail` runs just these five lanes. The wire-compat lanes, which swap in released relays and clients, skip them. + +The finite clients keep their session alive until the harness acknowledges the +reader's complete clean end over stdin, so a lane tests delivery rather than +shutdown. No sleep stands in for drain completion. A missing group, error, or +stall fails the lane; the timeout only bounds failure. QUIC on localhost rarely +reorders, so the ordering race remains covered by transport unit tests. + Every client closes its session on the way out: publishers stop when their input ends (the browser on SIGTERM), and subscribers close once they have their frame. After each publisher's round, the harness waits for the relay to log the close of @@ -129,6 +141,9 @@ just test interop --all # Pick your own axes: just test interop --publishers rust,python --subscribers rust,c,js-native-bun +# Finite track tails only: Rust-to-Rust and Rust/Node/Bun in both directions. +just test interop --tail + # Subscription termination: Rust/JS response bytes over in-memory transports. just test bare-fin diff --git a/test/interop/clients/js-native/package.json b/test/interop/clients/js-native/package.json index 06cf1c3524b..0eaba42fa11 100644 --- a/test/interop/clients/js-native/package.json +++ b/test/interop/clients/js-native/package.json @@ -2,6 +2,9 @@ "name": "@moq/interop-native", "private": true, "type": "module", + "scripts": { + "check": "tsc --noEmit" + }, "dependencies": { "@moq/hang": "workspace:*", "@moq/json": "workspace:*", diff --git a/test/interop/clients/js-native/tail.ts b/test/interop/clients/js-native/tail.ts new file mode 100644 index 00000000000..0a2cd33c8eb --- /dev/null +++ b/test/interop/clients/js-native/tail.ts @@ -0,0 +1,93 @@ +/** Finite raw-track interop: publish until the harness acknowledges, or read through clean EOF. @module */ +import { strict as assert } from "node:assert"; +import { createInterface } from "node:readline"; +import * as Moq from "@moq/net"; +import { install } from "@moq/web-transport"; + +install(); +const GROUPS = 4; +const BYTES = 256 * 1024; +const [role, url, path] = process.argv.slice(2); +if (!url || !path || !["publish", "subscribe"].includes(role)) { + throw new Error("usage: tail.ts publish|subscribe URL BROADCAST"); +} + +const origin = new Moq.Origin.Producer(); +const connection = await Moq.Connection.connect({ + url: new URL(url), + websocket: { enabled: false }, + ...(role === "publish" ? { publish: origin.consume() } : { consume: origin }), +}); +try { + if (role === "publish") { + const broadcast = origin.createBroadcast(Moq.Path.from(path)); + const track = broadcast.createTrack("tail"); + broadcast.announce(); + const demand = track.demand(); + while (!demand.used.peek()) await demand.used.changed(); + // The end precedes the last group's data; the transport still has to drain it. + track.finishAt(GROUPS); + for (let sequence = 0; sequence < GROUPS; sequence++) { + const group = track.appendGroup(); + group.writeFrame({ payload: new Uint8Array(BYTES).fill(sequence) }); + group.close(); + } + track.close(); + const lines = createInterface({ input: process.stdin }); + try { + const ack = await lines[Symbol.asyncIterator]().next(); + assert.equal(ack.value, "clean end", "reader did not acknowledge a clean end"); + } finally { + lines.close(); + } + broadcast.close(); + console.error("tail acknowledged"); + } else { + const request = origin.request(Moq.Path.from(path), { announced: true }); + try { + let broadcast = request.active.peek(); + while (!broadcast) { + await request.active.changed(); + broadcast = request.active.peek(); + } + const track = broadcast + .track("tail") + .subscribe({ maxDelay: Moq.Time.Milli(5000), groups: { start: { included: 0 } } }); + const seen: number[] = []; + try { + for (;;) { + const group = await track.recvGroup(); + if (!group) break; + try { + assert(group.sequence < GROUPS, `unexpected group ${group.sequence}`); + const frame = await group.readFrame(); + assert(frame, "empty group"); + assert.equal(frame.payload.byteLength, BYTES, "truncated group"); + assert( + frame.payload.every((byte) => byte === group.sequence), + "corrupt group", + ); + assert.equal(await group.readFrame(), undefined, "extra frame"); + seen.push(group.sequence); + } finally { + group.close(); + } + } + assert.deepEqual( + seen.sort((a, b) => a - b), + [0, 1, 2, 3], + ); + assert.equal(await track.finished(), GROUPS); + console.error("tail clean end=4 groups=0,1,2,3 bytes=1048576"); + } finally { + track.close(); + } + } finally { + request.close(); + } + } +} finally { + connection.close(); + origin.close(); +} +process.exit(0); diff --git a/test/interop/clients/js-native/tsconfig.json b/test/interop/clients/js-native/tsconfig.json new file mode 100644 index 00000000000..908e9404dc8 --- /dev/null +++ b/test/interop/clients/js-native/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../../../../js/tsconfig.json", + "compilerOptions": { + "types": ["bun"] + }, + "include": ["*.ts"] +} diff --git a/test/interop/clients/rust/tail.rs b/test/interop/clients/rust/tail.rs new file mode 100644 index 00000000000..82f64f74669 --- /dev/null +++ b/test/interop/clients/rust/tail.rs @@ -0,0 +1,94 @@ +//! Finite raw-track interop client. The harness acknowledges a clean read on stdin. +use std::time::Duration; + +use anyhow::{Context, ensure}; +use moq_tokio::moq_net; +use tokio::io::AsyncBufReadExt; + +const GROUPS: u64 = 4; +const BYTES: usize = 256 * 1024; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let args: Vec<_> = std::env::args().collect(); + ensure!( + args.len() == 4, + "usage: interop-tail publish|subscribe URL BROADCAST" + ); + let url: url::Url = args[2].parse()?; + let mut config = moq_tokio::connect::Config::default(); + config.websocket.enabled = Some(false); + let client = config.init(Default::default())?.with_reconnect(false); + let origin = moq_tokio::origin::spawn(); + + match args[1].as_str() { + "publish" => { + let broadcast = origin.create_broadcast(&args[3])?; + let mut track = broadcast.create_track("tail", None)?; + broadcast.announce(Default::default())?; + let _session = client + .with_publisher(&origin) + .connect(url) + .established() + .await?; + track.demand().used().await?; + // Declare the end before the final group's payload is even available. + track.finish_at(GROUPS)?; + for sequence in 0..GROUPS { + let mut group = track.append_group()?; + group.write_frame(moq_net::Timestamp::ZERO, vec![sequence as u8; BYTES])?; + group.finish()?; + } + // A finished track is not a drained transport. Keep the session alive + // until the harness confirms the subscriber checked every byte and EOF. + let mut ack = String::new(); + tokio::io::BufReader::new(tokio::io::stdin()) + .read_line(&mut ack) + .await?; + ensure!( + ack == "clean end\n", + "reader did not acknowledge a clean end" + ); + broadcast.close(); + eprintln!("tail acknowledged"); + } + "subscribe" => { + let consumer = origin.consume(); + let _session = client + .with_subscriber(origin) + .connect(url) + .established() + .await?; + let broadcast = consumer.routed_broadcast(&args[3]).await?; + let options = moq_net::track::Subscription::default() + .with_max_delay(Duration::from_secs(5)) + .with_groups(0..); + let mut track = broadcast.track("tail")?.subscribe(Some(options)).await?; + let mut seen = Vec::new(); + while let Some(mut group) = track.recv_group().await? { + let sequence = group.sequence; + let frame = group.read_frame().await?.context("empty group")?; + ensure!(sequence < GROUPS, "unexpected group {sequence}"); + ensure!(frame.payload.len() == BYTES, "truncated group {sequence}"); + ensure!( + frame.payload.iter().all(|byte| *byte == sequence as u8), + "corrupt group {sequence}" + ); + ensure!( + group.read_frame().await?.is_none(), + "extra frame in group {sequence}" + ); + seen.push(sequence); + } + seen.sort_unstable(); + ensure!( + seen == (0..GROUPS).collect::>(), + "wrong groups: {seen:?}" + ); + ensure!(track.finished().await? == GROUPS, "wrong declared end"); + eprintln!("tail clean end=4 groups=0,1,2,3 bytes=1048576"); + } + _ => anyhow::bail!("unknown role: {}", args[1]), + } + Ok(()) +} diff --git a/test/interop/interop.sh b/test/interop/interop.sh index 936e06a7a62..63370628dbb 100755 --- a/test/interop/interop.sh +++ b/test/interop/interop.sh @@ -38,13 +38,13 @@ RERUN="$(harness_env INTEROP_TIMEOUT INTEROP_FPS INTEROP_SIZE INTEROP_PORT INTER PUBLISHERS="rust" SUBSCRIBERS="rust" -# The idle-out check guards this checkout's relay and clients. A run that swaps in other -# binaries or JS clients (the wire-compat lanes run released ones) can't be held to it: a -# released client may not close cleanly, and a released relay names no connection when one -# closes. -IDLE_CHECK=1 +# The idle-out check and the finite-tail lanes guard this checkout's relay and clients. A +# run that swaps in other binaries or JS clients (the wire-compat lanes run released ones) +# can't be held to them: a released client may not close cleanly, a released relay names no +# connection when one closes, and the tail clients are built from this checkout only. +IN_TREE=1 if [[ -n "${RELAY_BIN:-}${MOQ_BIN:-}${INTEROP_SUB_MOQ:-}${INTEROP_NATIVE_CLIENT:-}${INTEROP_JS_PUBLISH_CLIENT:-}" ]]; then - IDLE_CHECK=0 + IN_TREE=0 fi TIMEOUT="${INTEROP_TIMEOUT:-20}" FPS="${INTEROP_FPS:-30}" @@ -55,6 +55,7 @@ URL="" KEY="" # the HMAC key every cell's token is signed with (set once the relay's auth server starts) NEGATIVE=0 MEDIA=0 +TAIL_ONLY=0 # Cargo profile for the relay/cli/moq-c builds. Debug compiles faster, which is # what an interop test wants; the workload (320x240@30) is trivial either way. @@ -95,6 +96,10 @@ while [[ $# -gt 0 ]]; do NEGATIVE=1 shift ;; + --tail) + TAIL_ONLY=1 + shift + ;; --media) MEDIA=1 shift @@ -125,6 +130,19 @@ done exit 2 } +if [[ "$TAIL_ONLY" -eq 1 ]]; then + if [[ "$NEGATIVE" -eq 1 || "$MEDIA" -eq 1 ]]; then + echo "error: --tail, --media, and --negative are separate runs" >&2 + exit 2 + fi + if [[ "$IN_TREE" -eq 0 ]]; then + echo "error: --tail builds its clients from this checkout; drop the binary and client overrides" >&2 + exit 2 + fi + PUBLISHERS="rust,js-native-node,js-native-bun" + SUBSCRIBERS="$PUBLISHERS" +fi + # The media checks drive both roles from the browser client and never touch the matrix, so they # pick their own axes rather than accepting --publishers / --subscribers. if [[ "$MEDIA" -eq 1 ]]; then @@ -180,8 +198,10 @@ require_tools() { # The relay, CLI, ffmpeg, and harness essentials are hard requirements. A # missing per-client toolchain (uv / bun / node / cc) just marks that client # broken in prepare, so it fails its own cells instead of the whole run. - local missing=() t - for t in cargo ffmpeg curl timeout; do + # Tail-only runs publish raw tracks, so they never encode with ffmpeg. + local missing=() t tools=(cargo curl timeout) + [[ "$TAIL_ONLY" -eq 1 ]] || tools+=(ffmpeg) + for t in "${tools[@]}"; do have "$t" || missing+=("$t") done if [[ ${#missing[@]} -gt 0 ]]; then @@ -218,6 +238,9 @@ build_relay_cli() { echo "error: failed to build moq-relay / moq-cli" >&2 exit 1 } + if [[ "$NEGATIVE" -eq 0 && "$MEDIA" -eq 0 ]]; then + (cd "$WORKSPACE" && cargo build --locked ${flag[@]+"${flag[@]}"} -p moq-cli --example interop-tail) + fi [[ -n "$RELAY" ]] || RELAY="$TARGET_BASE/$PROFILE/moq-relay" # The `moq-cli` crate ships its binary as `moq` (a `[[bin]]` override). [[ -n "$MOQ" ]] || MOQ="$TARGET_BASE/$PROFILE/moq" @@ -292,6 +315,10 @@ prepare_js() { sed 's/^/ /' "$HARNESS_RUN/js-vite.log" >&2 || true fi fi + if (needs js-native-node || needs js-native-bun) && ! (cd "$CLIENTS/js-native" && bun run check) >"$HARNESS_RUN/js-native-check.log" 2>&1; then + for v in js-native-node js-native-bun; do needs "$v" && mark_broken "$v" "type check failed"; done + sed 's/^/ /' "$HARNESS_RUN/js-native-check.log" >&2 || true + fi if needs js-native-node && ! have node; then mark_broken js-native-node "node not found" fi @@ -955,10 +982,72 @@ run_round() { stop_publisher "$pub_pid" "${pub%-denied}" fi # A round that expects no data ends its subscribers by timing out, which is its point. - [[ "$want_pass" -eq 0 || "$IDLE_CHECK" -eq 0 ]] || check_idle_outs "$pub" "$from" + [[ "$want_pass" -eq 0 || "$IN_TREE" -eq 0 ]] || check_idle_outs "$pub" "$from" return 0 } +# Raw-track clients have no codecs: every byte, group, and the declared end is checked. +# shellcheck disable=SC2329 # invoked indirectly via harness_spawn +run_tail_client() { + local lang="$1" role="$2" broadcast="$3" url="$4" limit="$TIMEOUT" + # The publisher outlives the subscriber's whole deadline, waiting for its acknowledgement. + [[ "$role" == publish ]] && limit=$(awk -v t="$TIMEOUT" 'BEGIN { print t * 2 }') + case "$lang" in + rust) timeout -k 3 "$limit" "$TARGET_BASE/$PROFILE/examples/interop-tail" "$role" "$url" "$broadcast" ;; + js-native-node) (cd "$CLIENTS/js-native" && timeout -k 3 "$limit" node --import tsx tail.ts "$role" "$url" "$broadcast") ;; + js-native-bun) (cd "$CLIENTS/js-native" && timeout -k 3 "$limit" bun tail.ts "$role" "$url" "$broadcast") ;; + *) + echo "unknown tail client: $lang" >&2 + return 1 + ;; + esac +} + +# shellcheck disable=SC2329 # invoked indirectly via harness_spawn +run_tail_publisher() { + local fifo="$1" + shift + run_tail_client "$@" <"$fifo" 9>&- +} + +run_tail_pair() { + local pub="$1" sub="$2" name="tail-$1-$2" pid subscriber_pid + local fifo="$HARNESS_RUN/tail-ack" broadcast="tail-$1-$2-$$-$RANDOM" + if is_broken "$pub" || is_broken "$sub"; then + echo " FAIL tail $pub -> $sub (client unavailable)" + overall=1 + return + fi + mkfifo "$fifo" + # Open both ends so neither child startup nor a failed publisher can block the harness. + exec 9<>"$fifo" + # Each side's token grants this broadcast alone, like a media round's. + harness_spawn "$name-pub" "$HARNESS_RUN/$name-pub.log" run_tail_publisher "$fifo" "$pub" publish "$broadcast" "$(token_url --publish "$broadcast")" + pid="$HARNESS_PID" + harness_spawn "$name-sub" "$HARNESS_RUN/$name-sub.log" run_tail_client "$sub" subscribe "$broadcast" "$(token_url --subscribe "**/$broadcast")" + subscriber_pid="$HARNESS_PID" + harness_wait "$subscriber_pid" || true + # Like run_native, a verified data result survives the NAPI addon's exit crash. + if grep -qx 'tail clean end=4 groups=0,1,2,3 bytes=1048576' "$HARNESS_RUN/$name-sub.log"; then + printf 'clean end\n' >&9 + harness_wait "$pid" || true + if grep -qx 'tail acknowledged' "$HARNESS_RUN/$name-pub.log"; then + echo " PASS tail $pub -> $sub (groups 0,1,2,3; clean end 4)" + else + echo " FAIL tail $pub -> $sub (publisher did not acknowledge)" + overall=1 + cat "$HARNESS_RUN/$name-pub.log" + fi + else + echo " FAIL tail $pub -> $sub (missing groups or clean end)" + overall=1 + cat "$HARNESS_RUN/$name-pub.log" "$HARNESS_RUN/$name-sub.log" + harness_reap "$pid" + fi + exec 9>&- + rm "$fifo" +} + # One media.ts invocation. It reports its own verdict (a negative control passes by failing on the # assertion it names), so the exit code is the whole answer. run_media() { @@ -1020,7 +1109,7 @@ elif [[ "$NEGATIVE" -eq 1 ]]; then # no data), proving the harness can actually report failure. echo "=== negative control: subscribers expect NO data ===" run_round "none" "interop-missing-$$-$RANDOM.hang" "" 0 "$(relay_next_line)" -else +elif [[ "$TAIL_ONLY" -eq 0 ]]; then for pub in "${PUB_LIST[@]}"; do broadcast="interop-${pub}-$$-${RANDOM}.hang" echo "=== publisher: $pub broadcast: $broadcast ===" @@ -1086,6 +1175,17 @@ else fi fi +if [[ "$NEGATIVE" -eq 0 && "$MEDIA" -eq 0 && "$IN_TREE" -eq 1 ]]; then + echo "=== finite track tails ===" + run_tail_pair rust rust + for runtime in js-native-node js-native-bun; do + if needs "$runtime"; then + run_tail_pair rust "$runtime" + run_tail_pair "$runtime" rust + fi + done +fi + if [[ "$overall" -eq 0 ]]; then echo "interop: all checks passed" else diff --git a/test/justfile b/test/justfile index ecf90ca316e..30114d289d7 100644 --- a/test/justfile +++ b/test/justfile @@ -33,6 +33,7 @@ harness: # browser + C++ publish; everyone subscribes (incl. native node/bun JS, the # moq-c C client, and the GStreamer moqsrc plugin). Other flags pass through, e.g. # `just test interop --publishers rust,python --subscribers rust,c`. +# Finite track tails run too; `--tail` selects just Rust/Node/Bun tail checks. # Both runs first check js/net's varints against moq-net's encoder at every size boundary, # and on lite-06/07 messages (the filter also matches `lite_varint_interop`), then # moq-transport OBJECT_DATAGRAMs both ways on every draft.