Skip to content

fix(moq-net): a live viewer's fresh lite-07 copy asks only for the live edge - #9165

Merged
kixelated merged 2 commits into
mainfrom
quest/m1/lite07-idle-oldest
Nov 19, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest/m1/lite07-idle-oldest

Conversation

@kixelated

@kixelated kixelated commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

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's opening: bool and newest: Option<u64> parameters are now a single newest, which callers set only when opening, so the pipelined path (always None) can no longer trigger the rewrite.
  • New integration test 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.
  • Deletes the finished quest 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 a None start 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 carry Oldest.. for these copies.

Caused by

  • moq-dev/moq#8638 - Range::span(None, None) now starts at Anchor::Oldest, so the idle rewrite's with_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

  • Reproduced first. Before the fix, the new test failed on the direct lite-07 path: the publisher saw [Range { start: Oldest, end: None }] where Relative(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).
  • Mutation check: with the cached-copy rewrite disabled, rejoin::rejoin_recovers_the_group_reset_on_leave fails. So the path this change keeps is still covered.
  • just check: lint and every other check passed. test rs reported 4 timeouts in model::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::tests behaves the same). Run alone, those tests pass, so the timeouts come from host load, not this change.

Decisions

  • Folded opening into newest instead 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 review after 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 medium

  • Classified: medium by default

  • Reviewer: Codex, gpt-6.1-sol, medium effort

  • Session: 01a1f324-10c3-77a3-8e74-df06f1a27f7c, round 1

  • Score: 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

kixelated and others added 2 commits November 19, 2026 00:56
…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>
@kixelated kixelated changed the title A live viewer's fresh lite-07 copy asks only for the live edge fix(moq-net): a live viewer's fresh lite-07 copy asks only for the live edge Nov 19, 2026
@kixelated
kixelated marked this pull request as ready for review November 19, 2026 09:30
@coderabbitai

coderabbitai Bot commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d5f035ad-385e-49bf-8281-caa08c46e7f0
Commits

Reviewing files that changed from the base of the PR and between 61e4a38 and 309f7b5.

Files selected for processing: 3

  • quest/m1/lite07-idle-oldest.md
  • rs/moq-net/src/lite/subscriber.rs
  • rs/moq-net/tests/integration/subscribe_ranges.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge pick (maintainer away, granted the coordinator merges it confidently recommends): ✅ /quest-merge, accepting the decision listed in the PR body (folding opening into newest).

(Written by Claude Opus 5.5 with high)

@kixelated
kixelated enabled auto-merge November 19, 2026 09:30

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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_request takes only newest: begin_subscription passes idle_newest().filter(|_| opening) and pipeline passes None. When the copy is not opening, the behavior is the same as before. A fresh or uncached copy now keeps the subscriber's ranges, so Relative(0).. stays Relative(0)...
  • Older wires are unchanged: wire_span already narrows them to one span, and with_start(None) produced that same span.
  • Regression test: a_live_viewer_asks_lite07_upstream_for_the_live_edge checks that the publisher's demand is exactly [Range::live()], both directly and through a lite-07 relay.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@kixelated
kixelated added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 22ea591 Nov 19, 2026
10 checks passed
@kixelated
kixelated deleted the quest/m1/lite07-idle-oldest branch November 19, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant