Skip to content

fix(net): report a cold relay's upstream Largest - #5030

Closed
kixelated wants to merge 2 commits into
mainfrom
quest/m1/ietf-cold-largest
Closed

kixelated wants to merge 2 commits into
mainfrom
quest/m1/ietf-cold-largest

Conversation

@kixelated

@kixelated kixelated commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

On drafts 14 to 19, a relay with no cached object for a track omitted Largest from its SUBSCRIBE_OK. The publisher only advertised a cached object, and the subscriber kept only the group from the upstream answer. A relative joining FETCH at offset 0 then had no current group and was refused with INVALID_RANGE.

Approach

The subscriber records the upstream SUBSCRIBE_OK Largest on the track copy, object included, in the same write that accepts a fresh track. A resumed copy records it before the read floor is updated. The publisher reports that Location from its live-edge snapshot only while the cache cannot name an object and a newer group has not moved the edge. A cached object still wins. The joining FETCH uses the existing one-group upstream fill. Nothing waits on a peer. The new track state is crate-private.

The publisher test is the wire regression: it decodes SUBSCRIBE_OK Largest and the objects from the relative joining FETCH. The relay test is the draft-16 path through a cold relay, reading the current group from object 0. That relay test can also pass when Largest is omitted, because this stack then skips the joining FETCH and forwards the group on the subscribe stream after the relay's own upstream fetch fills the cache.

Impact

  • Public API: none.
  • Wire: none. SUBSCRIBE_OK Largest was already defined. A cold relay now fills it with the upstream Location instead of omitting it.

Alternatives

Leaving INVALID_RANGE is what the draft requires when no Largest was sent, and it drops the current group's head for a late joiner. Waiting for the upstream fetch before SUBSCRIBE_OK would stall the answer on a peer.

Follow-ups

This completes quest/m1/ietf-cold-largest from #5020. The quest file is not on main, so quest/ is untouched. Delete that file once #5020 merges. If this lands first, drop quest/m1/ietf-cold-largest.md from #5020 so the completed quest is not reintroduced.

just check did not finish here: building moq-gst fails because sysprof-capture-4.pc is missing. That is unrelated to this change. cargo clippy -p moq-net --all-targets -- -D warnings, cargo fmt --all --check, cargo doc -p moq-net, and the cold-largest tests passed.

Subscribe ranges and fetch-without-subscribe stay out of this change.

(Written by Grok 4.5)

kixelated and others added 2 commits October 7, 2026 12:46
Co-authored-by: Grok 4.5 <noreply@x.ai>
Drafts 14 to 19 repeat the upstream SUBSCRIBE_OK Largest while a relay
has no cached object, so a relative joining FETCH at offset 0 is the
current group instead of INVALID_RANGE.

Co-Authored-By: Grok 4.5 <noreply@x.ai>

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Automated review by review (OpenAI)

Reviewed commit: 2bd3a96

No new actionable correctness findings. The direction is sound: rs/moq-net/src/ietf/subscriber.rs:1987–2017 records the complete upstream Location before fresh-track acceptance, and rs/moq-net/src/ietf/publisher.rs:6818–6838 limits the fallback to an otherwise unnamed edge. The existing shared snapshot still sets both the Next Object floor and joining-FETCH cap, preserving their boundary.

The wire-level publisher regression is important here; the new end-to-end relay test alone would not prove that Largest was transmitted, as the PR description correctly notes.

Verification limits: GitHub-only static review of all four changed files and the relevant track/fetch lifecycle; tests were not run independently. Check CI was still in progress when inspected. This is a COMMENT review, not a merge-readiness determination.

(Written by OpenAI)

@kixelated

Copy link
Copy Markdown
Collaborator Author

This seems like a hack

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