You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(net)!: moq-net publishes no item without a caller - #8931
track::Position::after, after_group, and group_end are removed (no caller; after_group is start + 1, which no longer names the next group). Two tests that used them spell the bound directly.
The 17 pub fn predicates of lite::Version (has_track_stream to has_route_cost) are pub(crate). All still have in-crate callers, so none was deleted.
track::Ordered::with_range is test-only (#[cfg(test)]): no production or cross-crate caller. Its docs now point at Subscriber::with_range before .ordered().
moq-audio is unchanged: its Start::Latest keeps narrowing the local cursor with Subscriber::with_range. A live range now reaches back by the delay's minimum age (#8958), which replays the groups a moved rendition left (moq play's a_moved_audio_rendition_plays_its_new_track fails with it). Audio's Latest start reaches back owns that change.
The lite subscriber no longer matches error variants to tell a reset from malformed bytes. coding::Reader::poll_recv returns Recv::{Message, Ended, Reset, Malformed}, classified where the reader knows (a transport reset or a FIN inside a message is Reset; a decode failure is Malformed). Recovery, the live subscription's response read, and the drain after FINISH read it; Malformed is Error::ProtocolViolation as before, Reset keeps its reason. The Result-returning readers are unchanged (they convert the same internal fault).
Quests: quest/m2/unused-api/net.md is rewritten to what remains: next_in_range, is_skipped, and poll_start (and with_range's last production caller) go private once the container reader moves onto track::Ordered's Gap, which #8910 landed.
Kept, with the caller
Downstream checked with shallow clones of moq-dev/moq.pro and kixel-ai/kixel.ai at their default branches, plus this tree.
origin::Consumer::covering stays pub: moq.pro calls it (rs/dash/src/dashboard.rs:336, rs/edge/src/origin_wire.rs:42), and moq-net's own benches/origin.rs (an external crate) does too. Kixel has no caller.
track::Subscriber::with_range stays pub: moq-mux's container/source.rs resubscribes from the group starting at after and must leave that group out. A Subscription time start names the group containing it, so no range can exclude one. Moving it needs the container reader to skip that group itself (recorded under group drops). moq-mux and moq-json tests also call it.
moq.pro still calls Subscription::default().with_range(..), already pub(crate) here before this PR; it breaks on its next bump regardless.
just api-diff rust against the last release lists exactly those three of this PR's removals for moq-net (the lite::Version predicates and Ordered::with_range are not reachable from the published API there; its other moq-net breaks come from earlier PRs).
Not public before the release or unreachable (mod lite is private): the lite::Version predicates, so no consumer can name them.
Migration: replace Position::after(g, f) and after_group(g) with Position::new(g, f + 1) and Position::group(g + 1) (no longer total at u64::MAX; a caller holding such a key has a bug), and group_end() with Bound::Excluded(g) for frame == 0, else Bound::Included(g). A caller of Ordered::with_range calls Subscriber::with_range before .ordered().
Wire: none. FFI: none.
Validation
cargo clippy --locked --workspace --all-targets -- -D warnings, cargo fmt --check, and RUSTDOCFLAGS="-D warnings" cargo doc -p moq-net -p moq-audio pass; moq-net also builds clean with no features and with fuzz.
cargo nextest run -p moq-net --features async (4289 tests, includes the lite subscriber, recovery, and integration suites) and -p moq-audio pass; after the merge with main, just check passes, its 11819 workspace tests included (moq play's moved-rendition test failed until moq-audio went back to its local cursor).
New coding::reader test a_read_tells_a_cut_stream_from_malformed_bytes covers each Recv outcome: a message, a clean end, a FIN inside a message, and a body cut short inside its declared size.
Not run: just test interop (no wire or FFI change; the subscriber read is behavior-identical by construction).
Decisions
The maintainer confirmed these decisions on 2026-11-16 (/quest-run); they were first recorded as taken without the maintainer. Decision 3 changed after the merge with main, below.
covering stays pub (moq.pro and the benches call it), against the quest's pub(crate).
Subscriber::with_range stays pub because source.rs cannot move; Ordered::with_range becomes test-only rather than pub(crate), since only tests call it and a plain pub(crate) is dead code.
moq-audio stays on its local cursor (changed from this PR's first head, which moved it to Range::live()). Since #8958 a live range reaches back by the delay's minimum age, so the move would replay what a moved rendition left; the reach-back belongs to Audio's Latest start reaches back. Subscriber::with_range stays pub either way.
The typed outcome lives on coding::Reader (poll_recv) and covers the three SubscribeResponse reads in the lite subscriber. lite::error::control and auth::protocol_error, which still classify errors from the other control streams (announce, probe, tracks, auth, the publisher), are left to the follow-up, which has no caller in this quest.
Follow-ups
Every control stream reads a typed Recv outcome (M, m3): the announce, probe, tracks, auth, and publisher readers read Recv, and lite::error::control and auth::protocol_error, which classify by matching errors, are deleted. No open decisions.
Score: 9/10, The incremental update leaves the reviewed code changes unchanged and introduces no actionable findings; builds and tests were not run as instructed.
Raised the risk to high: Public API removals can break downstream callers and require coordinated migrations that reverting this repository alone would not undo.
Rounds: 4; first round 0; findings 0: fixed 0, refuted 0, open 0
Remove Position::after, after_group, and group_end; make the 17 public
lite::Version predicates crate-private; make Ordered::with_range
test-only; move moq-audio's live start onto Range::live(). The lite
subscriber tells a reset from malformed bytes through a typed Recv
outcome from the reader instead of matching error variants.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
kixelated
changed the title
moq-net publishes no item without a caller
feat(net)!: moq-net publishes no item without a caller
Nov 16, 2026
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 9c285fa0-abb8-4d30-b47d-08c5b7a636e0
Commits
Reviewing files that changed from the base of the PR and between 427b8df and 15d5edd.
Files selected for processing: 11
quest/m2/audio-playout/browser-audio-hole-skip.md
quest/m2/net-renames.md
quest/m2/sockets/remove.md
quest/m2/unused-api/net.md
quest/m3/control-stream-recv.md
rs/moq-net/src/coding/reader.rs
rs/moq-net/src/lite/subscriber.rs
rs/moq-net/src/lite/subscriber/fills.rs
rs/moq-net/src/lite/version.rs
rs/moq-net/src/model/subscription.rs
rs/moq-net/src/model/track.rs
Walkthrough
The reader now distinguishes complete messages, clean stream completion, resets or truncation, and malformed data. Subscriber and recovery readers handle these outcomes separately. The changes also remove or restrict selected moq-net APIs and revise quest documents and links to describe the updated scope.
Merge Risk: Minimal · previous review 427b8
This PR adds typed receive outcomes to the lite subscriber and narrows several moq-net APIs, an intentional breaking change with no wire change. No concrete merge-blocking regression was established. The one kept comment about close timing on malformed responses concerns drain behavior that predates this change.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main change: moq-net drops public track::Position methods and makes other APIs private or test-only, under the 'publishes no item without a caller' theme. The title is short and …
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Description check
The description is specific and on-topic. It names the removed Position methods, the Version predicate visibility change, the Ordered::with_range test-only gating, the new coding::Reader::poll_recv ou…
Full details: Title check
Explanation
The title names the main change: moq-net drops public track::Position methods and makes other APIs private or test-only, under the 'publishes no item without a caller' theme. The title is short and describes the removal-focused breaking change. It omits the typed Recv outcome work, which is a secondary part of the change. The title matches the PR objectives, which use the same wording.
Full details: Description check
Explanation
The description is specific and on-topic. It names the removed Position methods, the Version predicate visibility change, the Ordered::with_range test-only gating, the new coding::Reader::poll_recv outcomes, and the rewritten quest docs. These all match the changeset in the raw summary, so the description is related to the changes.
Finishing Touches
Simplify code
Commit to this branch
Create a new PR
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.
The reason will be displayed to describe this comment to others. Learn more.
✅ No new issues found.
Reviewed changes
This review covers the full diff: the removals and narrowing of moq-net API, the typed Recv outcome on coding::Reader, its three users in the lite subscriber, the switch of moq-audio's Start::Latest to Range::live(), and the quest edits.
Position::after, after_group, group_end removed. The two track.rs tests now spell the same bounds directly: Bound::Excluded(0), and Bound::Included(1) for Position::new(1, 2). No other caller is left in rs/, js/, py/ or doc/.
lite::Version predicates and Ordered::with_range narrowed. The predicates are now pub(crate). Ordered::with_range and set_range are now #[cfg(test)], and their only remaining caller is the test at track.rs:26293. Subscriber::with_range and covering stay pub, and the PR body names their downstream callers.
Reader::poll_recv / Recv. These reads now return a typed outcome instead of matching error variants. I traced each call site against the old lite::error::control / auth::protocol_error handling:
Malformed only ever holds errors other than Short, and those used to map to ProtocolViolation, which closes the session.
A FIN inside a message is Reset(Decode(Short)), which the old code also passed through without closing.
Transport resets decode to Error::Session/Error::Stream, which protocol_error already left unchanged.
The ServeLoopFailed { err: ProtocolViolation } still ends in ServeEnd::GiveBack → control(), so its outcome is unchanged.
All three users behave the same as before.
moq-audio Start::Latest. It now subscribes with Range::live() and then waits on largest(), matching moq-video's decode/consumer.rs. The publisher is now asked only from the live edge, not from the oldest group, and playback is the same because the old local cursor also started at the live edge's group.
Quests. The finished quest file is deleted, along with its two backlinks. The leftover hand-offs (next_in_range, is_skipped, poll_start, Subscriber::with_range) are recorded in group-drops.md.
Keep moq-audio's Start::Latest on its local cursor: a live range now reaches back by the delay's minimum age, which replays the groups a moved rendition left.
The sweep's hand-offs stay in quest/m2/unused-api/net.md, rewritten to what remains.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The reason will be displayed to describe this comment to others. Learn more.
Automated review by review (OpenAI)
Reviewed head 427b8df713a9bd5925255cc30078a4eed05387ad.
No additional API regression found in static review. Subscriber::with_range and origin::Consumer::covering remain public, and Audio's Latest path still uses the local range rather than replaying the old rendition. The remaining removals and narrowed visibility match the documented cleanup; the existing downstream Subscription::with_range break is not introduced by this PR and still needs a migration before the next bump. The typed control read distinguishes clean FIN, mid-message termination/reset, and malformed data without opening the internal API. GitHub also reports this head is not mergeable against the current base; reconcile it before relying on the current review. I did not run the integration fixtures.
The reason will be displayed to describe this comment to others. Learn more.
✅ No new issues found.
Reviewed changes
Since the last review at 7504a52, the branch has three merges of origin/main, and the iteration has dropped the moq-audio change and rewritten the quests.
moq-audio change reverted.rs/moq-audio/src/decode/consumer.rs is no longer in the diff. Start::Latest stays on its local Subscriber::with_range cursor, because after #8958 a Range::live() start would replay groups that a moved rendition left behind.
Ordered::with_range docs re-pointed. The doc comments on poll_next_group and poll_largest now name Subscriber::with_range before Subscriber::ordered. Every remaining caller of Ordered::with_range/set_range is inside the #[cfg(test)] modules of track.rs and resume.rs, so the gate still compiles.
Unused-API quest rewritten.quest/m2/unused-api/net.md now covers only what is still left: next_in_range, is_skipped, and poll_start once the container reader moves onto Gap, plus the conditions for keeping Subscriber::with_range and covering public. The backlinks in net-renames.md and sockets/remove.md are dropped.
Added quest/m3/control-stream-recv.md. It takes over the remaining readers that still classify errors by matching variants (lite::error::control, auth::protocol_error), using this PR's three Recv reads as the pattern.
The reason will be displayed to describe this comment to others. Learn more.
Additional comments: 1
rs/moq-net/src/lite/subscriber.rs-14441-14444: 1
14441-14444: Major · Stability & Availability · Quick win
Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.
Handle malformed responses before waiting for Group Streams.
If a Group Stream remains unfinished, this branch enters ServeMode::Failed. That state returns Pending while tail.is_reading() is true. The session-level handler runs only after GiveBack, at Line 13163.
A publisher can therefore send malformed response bytes and leave the Group Stream open indefinitely. The session does not receive the required protocol-violation handling.
Invoke the session-level handler in this branch before waiting for Group Streams. Keep the reset path's separate drainage behavior.
Review info
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: 95ca41b0-398f-4ffe-bd3f-65932410e475
Commits
Reviewing files that changed from the base of the PR and between cb227b2 and 427b8df.
Files selected for processing: 11
quest/m2/audio-playout/browser-audio-hole-skip.md
quest/m2/net-renames.md
quest/m2/sockets/remove.md
quest/m2/unused-api/net.md
quest/m3/control-stream-recv.md
rs/moq-net/src/coding/reader.rs
rs/moq-net/src/lite/subscriber.rs
rs/moq-net/src/lite/subscriber/fills.rs
rs/moq-net/src/lite/version.rs
rs/moq-net/src/model/subscription.rs
rs/moq-net/src/model/track.rs
Files with no reviewable changes: 2
quest/m2/net-renames.md
quest/m2/sockets/remove.md
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.
Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.
Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.
The reason will be displayed to describe this comment to others. Learn more.
✅ No new issues found.
Reviewed changes
Since the last review at 427b8df, the branch has one merge of origin/main, and the only net change on this PR is in a quest file.
Dropped the setup::Extensions hand-off.quest/m2/unused-api/net.md no longer lists setup::Extensions as belonging to the ietf-records-per-track quest. The code changes reviewed earlier are unchanged.
Takes main's narrower Version::has_datagrams and its pruned @moq/net report
(#8929, #8931), keeping Group.Producer.finishAt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
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.
Does most of quest/m2/unused-api/net.md, which stays, rewritten to the hand-offs that remain.
Summary
track::Position::after,after_group, andgroup_endare removed (no caller;after_groupisstart + 1, which no longer names the next group). Two tests that used them spell the bound directly.pub fnpredicates oflite::Version(has_track_streamtohas_route_cost) arepub(crate). All still have in-crate callers, so none was deleted.track::Ordered::with_rangeis test-only (#[cfg(test)]): no production or cross-crate caller. Its docs now point atSubscriber::with_rangebefore.ordered().Start::Latestkeeps narrowing the local cursor withSubscriber::with_range. A live range now reaches back by the delay's minimum age (#8958), which replays the groups a moved rendition left (moq play'sa_moved_audio_rendition_plays_its_new_trackfails with it). Audio's Latest start reaches back owns that change.coding::Reader::poll_recvreturnsRecv::{Message, Ended, Reset, Malformed}, classified where the reader knows (a transport reset or a FIN inside a message isReset; a decode failure isMalformed).Recovery, the live subscription's response read, and the drain after FINISH read it;MalformedisError::ProtocolViolationas before,Resetkeeps its reason. TheResult-returning readers are unchanged (they convert the same internal fault).next_in_range,is_skipped, andpoll_start(andwith_range's last production caller) go private once the container reader moves ontotrack::Ordered'sGap, which #8910 landed.Kept, with the caller
Downstream checked with shallow clones of
moq-dev/moq.proandkixel-ai/kixel.aiat their default branches, plus this tree.origin::Consumer::coveringstayspub: moq.pro calls it (rs/dash/src/dashboard.rs:336,rs/edge/src/origin_wire.rs:42), and moq-net's ownbenches/origin.rs(an external crate) does too. Kixel has no caller.track::Subscriber::with_rangestayspub: moq-mux'scontainer/source.rsresubscribes from the group starting atafterand must leave that group out. ASubscriptiontime start names the group containing it, so no range can exclude one. Moving it needs the container reader to skip that group itself (recorded under group drops). moq-mux and moq-json tests also call it.Subscription::default().with_range(..), alreadypub(crate)here before this PR; it breaks on its next bump regardless.Impact
Public API: breaking, removals only.
track::Position::after,Position::after_group,Position::group_end.just api-diff rustagainst the last release lists exactly those three of this PR's removals for moq-net (thelite::Versionpredicates andOrdered::with_rangeare not reachable from the published API there; its other moq-net breaks come from earlier PRs).mod liteis private): thelite::Versionpredicates, so no consumer can name them.Migration: replace
Position::after(g, f)andafter_group(g)withPosition::new(g, f + 1)andPosition::group(g + 1)(no longer total atu64::MAX; a caller holding such a key has a bug), andgroup_end()withBound::Excluded(g)forframe == 0, elseBound::Included(g). A caller ofOrdered::with_rangecallsSubscriber::with_rangebefore.ordered().Wire: none. FFI: none.
Validation
cargo clippy --locked --workspace --all-targets -- -D warnings,cargo fmt --check, andRUSTDOCFLAGS="-D warnings" cargo doc -p moq-net -p moq-audiopass; moq-net also builds clean with no features and withfuzz.cargo nextest run -p moq-net --features async(4289 tests, includes the lite subscriber, recovery, and integration suites) and-p moq-audiopass; after the merge with main,just checkpasses, its 11819 workspace tests included (moq play's moved-rendition test failed until moq-audio went back to its local cursor).coding::readertesta_read_tells_a_cut_stream_from_malformed_bytescovers eachRecvoutcome: a message, a clean end, a FIN inside a message, and a body cut short inside its declared size.just test interop(no wire or FFI change; the subscriber read is behavior-identical by construction).Decisions
The maintainer confirmed these decisions on 2026-11-16 (/quest-run); they were first recorded as taken without the maintainer. Decision 3 changed after the merge with main, below.
coveringstayspub(moq.pro and the benches call it), against the quest'spub(crate).Subscriber::with_rangestayspubbecausesource.rscannot move;Ordered::with_rangebecomes test-only rather thanpub(crate), since only tests call it and a plainpub(crate)is dead code.Range::live()). Since #8958 a live range reaches back by the delay's minimum age, so the move would replay what a moved rendition left; the reach-back belongs to Audio's Latest start reaches back.Subscriber::with_rangestayspubeither way.coding::Reader(poll_recv) and covers the threeSubscribeResponsereads in the lite subscriber.lite::error::controlandauth::protocol_error, which still classify errors from the other control streams (announce, probe, tracks, auth, the publisher), are left to the follow-up, which has no caller in this quest.Follow-ups
Recv, andlite::error::controlandauth::protocol_error, which classify by matching errors, are deleted. No open decisions.next_in_range,is_skipped,poll_start, andwith_range, moved here from the deleted group-drops quest.Models
Size: S
Implementer: Claude Code, claude-sonnet-5-5, high effort (arm B)
Implementer: Claude Code, claude-sonnet-5-5, high effort (iterate, S, arm B)
🤖 Generated with Claude Code
(Written by Claude Sonnet 5.5 with high effort)
Review
Rewritten by
quest reviewafter each round.Head: 15d5edd
Base: origin/main at 9a5827e
Risk: high,
Public API removals can break downstream callers and require coordinated migrations that reverting this repository alone would not undo.Classified: medium by default
Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1e4b2-581c-7222-9083-e15c0443c28c, round 4Score: 9/10,
The incremental update leaves the reviewed code changes unchanged and introduces no actionable findings; builds and tests were not run as instructed.Raised the risk to high:
Public API removals can break downstream callers and require coordinated migrations that reverting this repository alone would not undo.Rounds: 4; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none