Repository navigation
fix(moq-net): a live viewer's fresh lite-07 copy asks only for the live edge - #9165
Conversation
Quest-Claim: dbe145a0a972ba1f
…ve edge An idle copy that cached no group rewrote the subscriber's ranges with no start, which since #8638 means Oldest, so a Range::live() viewer asked its upstream for every group the max age allows. Only a copy with a cached group rewrites the start now. 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 17 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. |
|
Merge pick (maintainer away, granted the coordinator merges it confidently recommends): ✅ /quest-merge, accepting the decision listed in the PR body (folding (Written by Claude Opus 5.5 with high) |
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound. This fixes the cause: the idle rewrite now runs only when the copy has a cached group to anchor on. Before, a fresh copy called with_start(None), and since #8638 that collapses to Oldest...
Reviewed changes
I reviewed the full diff: the wire_request signature change, both call sites and the new integration test.
wire_requesttakes onlynewest:begin_subscriptionpassesidle_newest().filter(|_| opening)andpipelinepassesNone. When the copy is not opening, the behavior is the same as before. A fresh or uncached copy now keeps the subscriber's ranges, soRelative(0)..staysRelative(0)...- Older wires are unchanged:
wire_spanalready narrows them to one span, andwith_start(None)produced that same span. - Regression test:
a_live_viewer_asks_lite07_upstream_for_the_live_edgechecks that the publisher's demand is exactly[Range::live()], both directly and through a lite-07 relay.
claude-opus-5-5 | 𝕏

A lite-07 relay or client opening a subscription for a viewer that asks only for the live edge (
Range::live()) now asks its upstream for the live edge. Before this, it asked for every group from the oldest the max age allows.Changes
TrackServe::wire_request(rs/moq-net/src/lite/subscriber.rs) rewrites an idle copy's start only when the copy holds a cached group. A copy with nothing cached keeps the subscriber's own ranges. The cached case is unchanged: a quiet track (a catalog) still sends its newest group again. The function'sopening: boolandnewest: Option<u64>parameters are now a singlenewest, which callers set only when opening, so the pipelined path (alwaysNone) can no longer trigger the rewrite.a_live_viewer_asks_lite07_upstream_for_the_live_edge(rs/moq-net/tests/integration/subscribe_ranges.rs) asserts that the publisher's demand is[Range::live()], both directly and through a lite-07 relay.quest/m1/lite07-idle-oldest.md.The JS subscriber sends the subscriber's ranges verbatim (
#withRanges→toWireRanges) and never rewrites idle copies, so it already behaved correctly.Older wires are unaffected. They narrow the request to one span (
wire_span) before this point, and aNonestart produced that same span before and after the change.Public API / wire impact
None. The change is internal: lite-07 SUBSCRIBE now carries
Relative(0)..where it used to carryOldest..for these copies.Caused by
Range::span(None, None)now starts atAnchor::Oldest, so the idle rewrite'swith_start(None), written when no start meant the live edge, widened a live viewer's request to every group (found by person, while testing moq-dev/moq#9045)Validation
[Range { start: Oldest, end: None }]whereRelative(0)..was expected. After the fix it passes, both directly and through the relay.cargo test -p moq-net --all-features: all pass (3358 lib, 608 integration).rejoin::rejoin_recovers_the_group_reset_on_leavefails. So the path this change keeps is still covered.just check: lint and every other check passed.test rsreported 4 timeouts inmodel::time::tests(trivial conversions; the file is untouched). On this shared host, any moq-net test process takes about 40s under nextest, whichever test it runs (model::subscription::testsbehaves the same). Run alone, those tests pass, so the timeouts come from host load, not this change.Decisions
openingintonewestinstead of adding a guard beside them, so callers can't express "opening with no cached group, rewrite anyway". A review can undo this.Follow-ups
None.
Models
Size: S
Implementer: Claude Code, claude-opus-5-5, medium effort
🤖 Generated with Claude Code
(Written by Claude Opus 5.5 with medium)
Review
Rewritten by
quest reviewafter each round.Head: 309f7b5
Base: origin/main at 1aa86d5
Risk: medium,
the base has no RISK.md to name what is always high or customer-facing, so every change is mediumClassified: medium by default
Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1f324-10c3-77a3-8e74-df06f1a27f7c, round 1Score: 9/10,
Source inspection found no actionable defects, and regression coverage includes direct and relayed lite-07 subscriptions, though builds and tests were intentionally not run.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none