Repository navigation
fix(net): request compressed prefixes for mid-group application ranges #6242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
250ec75
chore: claim compressed application range widening
kixelated b4f9aa1
fix(net): request missing compressed prefixes for application ranges
kixelated b85b408
test(net): account for retained floors in relayed range updates
kixelated a7b124d
Merge remote-tracking branch 'origin/main' into ready-6242
kixelated 2f16b62
fix(net): refresh a held compressed prefix before requesting its tail
kixelated 4e3acd8
Merge remote-tracking branch 'origin/main' into ready-6242
kixelated 9a2a750
style(net): format the prefix eviction test
kixelated a70e370
Merge remote-tracking branch 'origin/main' into quest/m1/compress/app…
kixelated 9f9daa4
quest: keep the moq-transport half of compressed range widening open
kixelated File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # [M] A moq-transport mid-group subscription to a compressed track widens to frame 0 | ||
|
|
||
| ## Goal | ||
|
|
||
| An application range starting mid-group on a compressed track, requested over | ||
| moq-transport draft-17+ with the Flate extension negotiated, reads the frames | ||
| it asked for instead of failing with `Lagged` against a publisher that serves | ||
| exactly the requested Object range. The requesting IETF subscriber widens the | ||
| SUBSCRIBE start to Object 0 when it lacks the group's prefix, as lite-07 does | ||
| since [moq-dev/moq#6242](https://github.com/moq-dev/moq/pull/6242). The server | ||
| never widens and keeps serving exactly what is asked. | ||
|
|
||
| ## Plan | ||
|
|
||
| The rule is the [epic](/quest/m1/compress/README.md)'s Ranges rule, decided | ||
| with the maintainer on 2026-10-20: the subscriber widens, never the server; | ||
| one that holds frames 0..N-1 still asks from N; the reader still starts at the | ||
| frame it asked for. Lite-07 applies it through `track::Producer::widen_compressed` | ||
| (`rs/moq-net/src/model/track.rs`), which a warm IETF copy can reuse. | ||
|
|
||
| Split from #6242 because a two-hop matrix (lite-07 and moq-transport-17, 18 | ||
| and 22 on either hop) found three gaps under the IETF requester that are not | ||
| about compression: | ||
|
|
||
| - A cold SUBSCRIBE (`Target::Request` in `rs/moq-net/src/ietf/subscriber.rs`) | ||
| learns the track is compressed only from SUBSCRIBE_OK. Widening every cold | ||
| mid-group start on a Flate session would make plain tracks pay for the | ||
| prefix too. Decide between learning the properties first (TRACK_STATUS where | ||
| `TrackStatusOk::describes_track` holds) and widening cold starts only on | ||
| Flate sessions. | ||
| - Readers get IETF-received groups whole: `track::Subscriber::deliver` skips | ||
| the frame window when `group.relayed()`, since Object IDs may not be frame | ||
| ordinals. An application on an IETF hop therefore already reads frames below | ||
| its start on plain tracks, and widening would hand it more. Filter by | ||
| ordinal when the copy's Object IDs are dense, or by Object ID. | ||
| - REQUEST_UPDATE carries no range, so a live range change never reaches | ||
| upstream; [moq-transport ranges](/quest/m1/subscribe-ranges/ietf.md) owns | ||
| that. | ||
|
|
||
| In the matrix, our own IETF publisher served the whole group for a mid-group | ||
| Absolute start, so the `Lagged` failure needs a publisher that honors the | ||
| exact start; test against the publisher model directly. | ||
|
|
||
| `js/net` needs no mirror: its subscriptions carry group ranges only | ||
| (`Subscription.groups`), so a JS SUBSCRIBE always starts at frame 0, and a | ||
| compressed group that does not is refused with `TooFarBehind`. | ||
|
|
||
| Regression: extend | ||
| `application_ranges_keep_their_filter_after_requesting_the_compressed_prefix` | ||
| (`rs/moq-net/tests/integration/compress.rs`) over moq-transport-17, 18 and 22 | ||
| hops. | ||
|
|
||
| Public API: none. Wire: none. | ||
|
|
||
| ## Related | ||
|
|
||
| - [moq-transport ranges](/quest/m1/subscribe-ranges/ietf.md) - carries a live range change upstream on REQUEST_UPDATE | ||
| - [Bounded tails](/quest/m1/subscribe-ranges/bounded-tail.md) - a copy cut at a request's end must accept its tail before a warm prefix can be extended |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,42 @@ | ||
| # [M] A copy that stopped at a request's end bound accepts its tail | ||
|
|
||
| ## Goal | ||
|
|
||
| A group received for a request whose end falls mid-group stays open to the | ||
| rest of that group. When later demand asks the same sequence past that end, | ||
| the tail is accepted instead of rejected as `Duplicate`, so a second | ||
| subscriber on the same relay reads the frames it asked for. This holds for | ||
| plain and compressed tracks on every version that carries frame bounds. | ||
|
|
||
| ## Plan | ||
|
|
||
| Found on [moq-dev/moq#6242](https://github.com/moq-dev/moq/pull/6242) while | ||
| answering Codex's | ||
| [P1](https://github.com/moq-dev/moq/pull/6242#discussion_r4345457940): through | ||
| one relay, a subscriber reads group 5 frames 0..3 and a second then asks for | ||
| 3..5. The tail never arrives, on a plain track and on a compressed one alike. | ||
|
|
||
| - `GroupRecv` (`rs/moq-net/src/lite/subscriber.rs`) calls `group.finish()` | ||
| when a group stream ends cleanly, including one that ended only because the | ||
| request's end bound was reached. The truncated copy then looks complete. | ||
| - `claim_sequence` and `covering_group` (`rs/moq-net/src/model/track.rs`) | ||
| judge a copy only by its first frame, so every later stream for that | ||
| sequence is `Duplicate`, whatever frame it was asked from. | ||
| - Fix it in the receive path: a stream that stopped at the request's end | ||
| bound is not the group's end. Weigh leaving the copy unfinished so a tail | ||
| appends from its end (one copy; a compressed group keeps inflating against | ||
| its own prefix, which `widen_compressed` relies on when it keeps a request at | ||
| N) against letting a bounded copy stop covering a request past its end so | ||
| the new stream replaces it (compressed requests would then widen to frame 0 | ||
| again). | ||
| - A peer must not be able to pass off an early FIN as reaching the bound. | ||
|
|
||
| Test on mock time through a relay: a bounded first subscriber, then a second | ||
| asking past its end, on plain and compressed lite-07 tracks, and on | ||
| moq-transport draft-20+ if its Absolute end reaches the same path. | ||
|
|
||
| Public API: none expected. Wire: none. | ||
|
|
||
| ## Related | ||
|
|
||
| - [Compressed tracks](/quest/m1/compress/README.md) - its Ranges rule keeps a warm request at N, which this makes reachable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.