Repository navigation
fix(net): a moq-transport reader from the oldest group asks for the backlog - #9405
Conversation
Quest-Claim: 8b1da95323ed784f
…acklog Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…oup 0 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h the quest Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… oldest reader fills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 11 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
ℹ️ No critical issues — one small cleanup inline.
Approach: sound. It fixes both causes in Rust and JS together. First, the wire start now asks from group 0 for an Oldest range whose budget reaches back. Second, the fill floor now marks a live join's start as publisher-resolved. It reuses the settled #7883 path (a filterless SUBSCRIBE plus one range FETCH) and adds no new wire shape.
Reviewed changes — I read the full diff at 8790a76 (6 commits, 7 files):
wire_start/wireStart: an Oldest range asks from group 0 whenDelay::maxis not zero. Rust treatsSome(ZERO)as the default, and JS treats an omittedmaxas0andnullas unbounded, so the two sides agree.wire_bounds: the REQUEST_UPDATE span now goes throughwire_start, which drops thejoinsspecial case. With a zero budget, an Oldest range next to a time range now keeps the placed live join.- Resolved live start: every IETF live join that has a Largest declares
FeedStart::Resolved(Ruststart_resolved; JSstartTrack({ resolved }), read in#fillFloor). The groups below stay fillable for any reader whose budget reaches them. - Tests: Rust
an_oldest_range_asks_from_group_zeroandan_oldest_reader_fetches_the_groups_below_largestare new. JS adds an Oldest variant of the group-0 join test and a test for an Oldest reader joining a live copy late, on drafts 18, 20 and 22. - Docs/quest:
doc/concept/standard.mdnow says when an Oldest reader asks from group 0. The finished quest file is deleted.
In Rust, a patient Oldest reader that joins an existing live copy goes through the update path instead of the resolved flag. wire_bounds returns (Some(0), None), so the copy sends a SUBSCRIBE_UPDATE with no filter and calls start_at(Some(0)), which replaces the resolved start. The gaps below Largest then fold after the miss grace and get filled. A Time range below the join already takes this path, so this PR adds no new risk there.
claude-opus-5-5 | 𝕏
Co-Authored-By: pullfrog[bot] <226033991+pullfrog[bot]@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — the delta since the prior Pullfrog review at 8790a76:
- Spelled out the Largest-less live join:
(true, None) => track.start_at(0)replaces the deadlargest.map_or(0, …), applying the earlier suggestion unchanged. Behavior is identical.
claude-sonnet-5-5 | 𝕏
Ports main's mid-group ends (#9402), answered joins past the end (#9311), the ietf Oldest start (#9405), and the kept-out reask (#9435) onto per-range Live max ages. Main's tests that leaned on a subscription-wide delay take a Live range now; two that relied on a history range expiring let the replaced route fail instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Claims and finishes quest/m1/ietf-oldest-backlog.md.
Changes
A moq-transport subscriber reading from
track::Start::Oldestused to ask for a live join, so it got only the live group, never the backlog the publisher holds. Two things were wrong, in both Rust and JS:Subscription::start()(Rust) orwireSpan(JS), which treat an Oldest range as "no start", and "no start" means a live join. A newwire_start/wireStartsends group 0 for any Oldest range whoseDelay::maxreaches back. That is the filterless SUBSCRIBE moq-dev/moq#7883 settled on for a group-0 start, so the copy's fills then fetch the groups below Largest with one range FETCH.wire_bounds(the REQUEST_UPDATE span) uses the same rule, which replaces itsjoinsspecial case.Misses::judgein Rust,#fillFloorin JS) only fills below a declared start for readers that name a group there. An Oldest reader names none, so it was never offered the history. ATime(0)reader names group 0, which is why its path worked. An IETF live join now declares its start (SUBSCRIBE_OK's Largest) as publisher-resolved (start_resolvedin Rust; a newresolvedflag on JSstartTrack), the existing rule lite-06+ uses: every group below it stays fillable, and each reader's budget decides what it asks. This also covers a patient Oldest reader that joins a JS copy after its SUBSCRIBE, which JS never re-asks upstream because its REQUEST_UPDATE carries no range.Docs: doc/concept/standard.md says when an oldest reader asks from group 0.
Impact
Delay::max, now sends a filterless SUBSCRIBE. Once the copy is current it sends one range FETCH below Largest, instead of a live join (Next Object plus a draft-18 joining FETCH or a draft-20+ fill). A third-party publisher that answers the range delivers its backlog. Our own publisher still refuses a multi-group FETCH, as feat(ffi)!: expose socket endpoints and preserve IETF starts #7883 decided, so against moq-net the reader gets the whole latest group and the history below it is reported dropped.Delay::maxzero) still joins live, unchanged.Decisions
Taken without the maintainer, who was away; a review can undo each:
Delay::maxnot zero). Why: the default subscription is an Oldest range with a zero budget, which keeps only the latest group. Sending every default reader a filterless SUBSCRIBE plus a range FETCH would ask for history the reader then discards, and would make a spec-following publisher replay its whole retention. The quest's plan said "any non-empty Oldest range"; that version broke 11 IETF subscriber tests that expect a default reader to join live. Not chosen: every Oldest range (the plan as written).a_live_join_keeps_its_bounds_for_a_range_it_already_delivers. A zero-budget Oldest range delivers only the latest group, which the join already covers; with a budget that reaches back it still widens to group 0, and the test now pins both.Time(0)reader does. An end-to-end run against our publisher (below) confirmed the FETCH goes out.Validation
ServeEnd::Fillshowed aTime(0)reader asking fill0..4501while an Oldest reader asked nothing. With both halves, the Oldest reader asked the same0..4501fill, which our publisher then refused as designed. I dropped that test because, against our own publisher, it can only show the refusal.an_oldest_reader_fetches_the_groups_below_largest(draft 22, scripted peer):Time(0)andOldestboth send a filterless SUBSCRIBE and then the identical range FETCHAbsolute {0,0}..=group 8below Largest 9. Rustan_oldest_range_asks_from_group_zeropinswire_start/wire_boundsfor Oldest alone, beside a live join, bounded, and with a zero budget.a start of group 0 joins live with no filter and fetches the groups below Largestnow also runs from the oldest group, on drafts 18, 20 and 22. Mutation check: reverting either half (wireStart's Oldest rule, or theresolvedflag) fails exactly the three oldest-group cases. Newa reader from the oldest group joining a live copy fetches the groups below Largestcovers a patient reader joining after the live join; it fails on all three drafts withresolvedlimited to group-0 joins.cargo test -p moq-net --features async: all pass (3605 lib, 639 integration).bun test src/ietf/: 667 pass.just check: pass. Its first run after the round-1 fix timed out two unrelatedstitch_testsunder nextest. They passed alone, 20 of 20 in a nextest stress loop, and in a cleanjust checkrerun; their harness doesn't reach the changedSubscribeOncepath.just test interop --all: all checks passed.Caused by
Subscription::start(). moq-dev/moq#8402 and moq-dev/moq#9316 moved that code without changing it. Found on moq-dev/moq#9265 (found by reviewer).Follow-ups
None. quest/m1/live-max-age.md may redefine a None start on lite-07; this PR keeps Oldest meaning the oldest group the publisher holds, bounded by the reader's budget, as the quest asked.
Models
Size: S
Implementer: Claude Code, claude-opus-5-5, unknown effort (arm A)
Implementer: Claude Code, claude-opus-5-5, unknown effort (iterate, S)
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: 8790a76
Base: origin/main at 040a566
Risk: medium,
It is a bug fix in shipped Rust and JS moq-transport subscriber code that keeps the API and wire format: an Oldest-range reader with a non-zero delay budget now sends a filterless SUBSCRIBE from group 0 and fetches the backlog, so a moq-transport peer may deliver more history than before, and a revert fully undoes it, which keeps it out of high.Classified: medium by Claude Code, claude-haiku-5-5, low effort, session
54e0f2f3-4112-47af-bbc6-2bde456c0e65Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a203ba-9df5-7602-8547-2b0404924d26, round 2Score: 10/10,
The incremental changes fix budget widening, the existing plan and tests support the group-0 behavior, and code inspection found no new issues.Rounds: 2; first round 2 (medium 2); findings 2 (medium 2): fixed 1, refuted 1, open 0
Findings: none
The last round's findings, at 3c84221:
rs/moq-net/src/ietf/subscriber.rs:14503:Preserve current-group head recovery for Oldest readers;The base's quest/m1/ietf-oldest-backlog.md explicitly selects the existing unfiltered group-0 path, and rs/moq-net/src/ietf/subscriber.rs:18288 and js/net/src/ietf/join.test.ts:286 pin skipping cut Largest groups; the external #7883 decision could not be fetched.js/net/src/ietf/subscriber.ts:1694:Enable backlog fills when an existing JavaScript reader widens its budget;js/net/src/ietf/subscriber.ts:1698 now marks every live start with Largest as resolved, allowing #fillFloor to admit older groups after budget widening, with a new regression test covering a later Oldest reader across drafts 18, 20 and 22.Since the reviewed head 8790a76, the only change is a8d7496, which applies Pullfrog's suggested patch from this thread unchanged: a reviewer's suggested patch applied as-is needs no new local round.