diff --git a/quest/m0/test-flakes-2/README.md b/quest/m0/test-flakes-2/README.md index e379e19a9f8..206ac2612f0 100644 --- a/quest/m0/test-flakes-2/README.md +++ b/quest/m0/test-flakes-2/README.md @@ -69,7 +69,6 @@ Public API: none. Wire: none. ## Required - [IETF22 fallback](/quest/m0/test-flakes-2/ietf22-fallback.md) - an IETF22 browser viewer follows a fallback within the media lane's bound, keeping its session and its audio -- [Draft-22 interop with a native publisher](/quest/m0/test-flakes-2/draft22-interop.md) - no "invalid fetch range" or audio gap with a Rust or C++ publisher - [moq-tokio's close-drain test survives load](/quest/m0/test-flakes-2/tokio-close-drain.md) - `quic_client_close_drains_finished_track` stops failing land batches with "Unroutable" - [@moq/net's close-drain tests survive load](/quest/m0/test-flakes-2/js-close-drain.md) - the lite close-drain cases pass on every full suite run - [@moq/net's boundary-sync test survives load](/quest/m0/test-flakes-2/js-boundary-sync.md) - "a version without a boundary syncs" passes under load diff --git a/quest/m0/test-flakes-2/draft22-interop.md b/quest/m0/test-flakes-2/draft22-interop.md deleted file mode 100644 index 5d826b95ee2..00000000000 --- a/quest/m0/test-flakes-2/draft22-interop.md +++ /dev/null @@ -1,20 +0,0 @@ -# [S] Draft-22 interop with a native publisher holds - -## Goal - -Interop on moq-transport draft 22 with a Rust or C++ publisher stops failing -with "invalid fetch range" and an audio gap, or is shown not to reproduce on -current main. - -## Plan - -[moq-dev/moq#7085](https://github.com/moq-dev/moq/pull/7085) hit it and cited -`ffi-audio-gap.md`, which [moq-dev/moq#6990](https://github.com/moq-dev/moq/pull/6990) -deleted. [moq-dev/moq#7204](https://github.com/moq-dev/moq/pull/7204) has -since limited IETF publishers to one group of history, which may change it. -Reproduce on current main first. If it no longer reproduces, delete this quest -with that evidence; otherwise fix the range at its source. - -Decided 2026-10-30 (maintainer, /quest-plan of the 2026-10-30 /quest-complete follow-ups): ✅ new flake child / drop. - -Public API: none. Wire: none unless the fix shows a FETCH range bug. diff --git a/rs/moq-net/src/ietf/subscriber.rs b/rs/moq-net/src/ietf/subscriber.rs index e3b5e247c24..a90cfb953ee 100644 --- a/rs/moq-net/src/ietf/subscriber.rs +++ b/rs/moq-net/src/ietf/subscriber.rs @@ -3670,25 +3670,22 @@ impl Subscriber { _ => false, }; let ranges = if bounds != sent_bounds { - let mut join = if Filter::is_draft20(self.version) { - subscribe_join(bounds.0, bounds.1, self.version) - } else { - Join { - filter: match bounds { - (None | Some(0), None) => Filter::Unfiltered, - (start, end) => Filter::Absolute { - start: ietf::Location { - group: start.unwrap_or(0), - object: 0, - }, - end: end - .and_then(|end| end.checked_sub(1)) - .map(|group| ietf::EndLocation { group, object: None }), + // Widen from the requested group bounds, not a fresh Next Object edge: + // that would cut the unread tail of a group already in flight. + let mut join = Join { + filter: match bounds { + (None | Some(0), None) => Filter::Unfiltered, + (start, end) => Filter::Absolute { + start: ietf::Location { + group: start.unwrap_or(0), + object: 0, }, + end: end + .and_then(|end| end.checked_sub(1)) + .map(|group| ietf::EndLocation { group, object: None }), }, - fill: None, - fetch: false, - } + }, + ..Default::default() }; if widened && Filter::is_draft20(self.version) { join.fill = Some(ietf::Fill { @@ -3699,8 +3696,6 @@ impl Subscriber { group_order: Some(GroupOrder::Ascending), range_filters: false, }); - } else { - join.fill = None; } Some(join) } else { @@ -16993,6 +16988,44 @@ mod new_group_tests { relay.serving.abort(); } + /// Widening to an open start must retain the objects already being streamed. Next + /// Object would snapshot a later edge and cut that stream before its tail arrives. + #[kio::test] + async fn widening_to_an_open_start_does_not_rejoin_at_the_next_object() { + for end in [None, Some(7)] { + let (mut relay, mut first) = relay().await; + let (mut stream, _) = relay.accept().await; + accept(&mut stream, false, 5).await; + + first.update(track::Subscription::default().with_range(6..)).unwrap(); + let _ = read(&mut stream).await; + answer(&mut stream).await; + + let wanted = track::Subscription::default(); + let wanted = match end { + Some(end) => wanted.with_range(..end), + None => wanted, + }; + first.update(wanted).unwrap(); + let (id, body) = read(&mut stream).await; + assert_eq!(id, ietf::SubscribeUpdate::ID); + let msg = ietf::SubscribeUpdate::decode_msg(&mut body.decoder(VERSION), VERSION).unwrap(); + let expected = match end { + None => ietf::Filter::Unfiltered, + Some(end) => ietf::Filter::Absolute { + start: ietf::Location { group: 0, object: 0 }, + end: Some(ietf::EndLocation { + group: end - 1, + object: None, + }), + }, + }; + assert_eq!(msg.filter, Some(expected)); + assert_eq!(msg.fill.unwrap().filter, Some(ietf::Filter::Relative(1))); + relay.serving.abort(); + } + } + /// Delayed headers, including one already waiting for REQUEST_OK, belong to the /// request they answer and cannot consume a later widening's fill. #[kio::test]