Repository navigation
Conversation
Quest-Claim: 7bceb2f8a89bcb2f
A group given up for a newer one, such as one an on-demand track's dropped producer left open, resets its moq-transport stream with DELIVERY_TIMEOUT instead of CANCELLED, and Error::superseded (JS Error.superseded) says so on either wire. libmoq's raw and meta readers, moq-ffi's ordered reader, and the moq-json readers branch on it instead of matching Error::Old. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… timeouts failures Review: a moq-lite DELIVERY_TIMEOUT is a publisher's own timeout, not a superseded group, and a fetch recovering from a superseded copy expects OLD. Decode the moq-transport code as OLD at the wire instead, so superseded() means OLD alone. Mirrored in JS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A publisher's own timeout now resets a moq-transport stream with INTERNAL_ERROR in Rust and JS, so a received DELIVERY_TIMEOUT from our peers only ever means a newer group superseded this one. The moq-hls and relay fetch miss checks and the stream-credit test use superseded(); the changelog and binding docs note the mapping. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reader.stop with a numeric code now goes through toStreamCode, so a bare DELIVERY_TIMEOUT is not sent to a moq-transport peer that reads it as a superseded group. The sharedStreamCode, DELIVERY_TIMEOUT constant and Go wrapper docs say what that code carries there. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 28, 2026
Collaborator
Author
|
Superseded by #9847: per the maintainer, a group's failure now stays with that group and readers continue past it, so (Written by Claude Opus 5.5) |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Finishes and deletes quest/m2/typed-superseded-group-end.md.
A group cut short because a newer one superseded it, such as one an on-demand track's dropped producer left open while a reader held it, now reaches readers as superseded on moq-lite and moq-transport alike, and the readers branch on a typed classification instead of matching
Error::OldandStreamError::Old.Over moq-transport the Rust publisher dropped that group's stream writer, which resets with
CANCELLED. A subscriber reads a cancelled group as one to recover elsewhere, which on an on-demand track finds nothing, so libmoq's C raw reader with an unlimiteddelay.maxended the whole track withNotFoundinstead of reading on to the next producer's group (reproduced inraw_track_reads_past_a_group_a_drop_left_openbefore the fix). A moq-net reader holding the group waited on that recovery until the next producer arrived.Changes
Error::superseded()(Rust) andError.superseded(err)(JS): whether a group read failed because a newer group superseded the group, so the reader moves on rather than ending the track. True forOld, whether this reader's own budget, this side's track, or a reset said it. A publisher's explicit group abort, and its own timeout, are never superseded on either wire. MirrorsError::retry/retry(err).StreamError::Oldencodes asDELIVERY_TIMEOUT(0x2) instead ofINTERNAL_ERROR, and a receivedDELIVERY_TIMEOUTdecodes asOld, in Rust and JS. A publisher's own timeout (StreamError::DeliveryTimeout, JSTimeoutError) now resets withINTERNAL_ERRORthere, so from our peers that code only ever means superseded. The RustGroupServeresets a superseded group's stream with it (stale while serving, stale after an unacknowledged FIN, or given up upstream) instead of dropping the writer asCANCELLED. Every other group failure still resets as before. A fetch recovering from a superseded subscription copy therefore still seesOld, as on moq-lite.rs/moq-net/CHANGELOG.mdgains the entries; libmoq's and moq-ffi'sDELIVERY_TIMEOUTkind docs say it reports asOLDover moq-transport;doc/concept/standard.mdlists theDELIVERY_TIMEOUTmapping among the moq-transport choices;doc/lib/rs/moq-net.mdanddoc/lib/js/net.mdsay how to read past a superseded group.Impact
moq_net::Error::superseded(&self) -> bool; JSError.superseded(err: unknown): booleanfrom@moq/net(API report updated). No migration.DELIVERY_TIMEOUTinstead ofCANCELLED(Rust subgroup streams) orINTERNAL_ERROR(fetch streams, and JS). An older peer reads it as a delivery timeout, a group failure as before. A peer'sDELIVERY_TIMEOUTnow reads asOldhere, so a relay carries it onto moq-lite asOLD. A publisher's own timeout resets a moq-transport stream withINTERNAL_ERRORinstead ofDELIVERY_TIMEOUT, so a reader may retry it once per route where it used to give up. During a rollout, an older relay fetching over moq-transport from a newer one reads a superseded fetch'sDELIVERY_TIMEOUTas a terminal timeout rather than the retryableINTERNAL_ERRORit got before; relays link over moq-lite, so this needs a moq-transport relay hop. moq-lite is unchanged, so no lite draft changes; moq-transport has no draft of ours covering reset codes.moq-hlsanswers a group that aged out across a moq-transport hop as a cache miss (404), as it does across moq-lite.Caused by
Oldand had libmoq and moq-ffi skip them by matchingError::Old | StreamError::Old, which never reaches a reader over moq-transport (found by person).Decisions
Error::superseded()besideError::retry(), which a group read'sErranswers wherever it came from.Option<Frame>). It breaks about 1,300 call sites ofread_frame/poll_read_frameacross the workspace for one more arm.group::Consumer::superseded(). libmoq's metadata reader readsmeta::Group, and moq-ffi's ordered reader and the moq-json consumers see the error after the group is gone, so each would need its own accessor.Ok(None). A truncated group would read as whole to archives, HLS export, and relays.DELIVERY_TIMEOUTcarries superseded on moq-transport, decoded asOldat the wire. Its registry has noOLD, and a group given up for a newer one is late content its reader skips, which is what other moq-transport publishers say with it. Decoding it asOld(after review round 1) keepssuperseded()toOldalone, so a moq-liteDELIVERY_TIMEOUTstays a failure and fetch recovery keeps itsOldpath.INTERNAL_ERROR. A reader cannot tell it from a failure.INTERNAL_ERRORanyway.DeliveryTimeoutas superseded on every wire (round 1's version). It hid a moq-lite publisher's own timeout and skipped fetch recovery.INTERNAL_ERRORon moq-transport (review round 2). One code cannot say both superseded and failed, and superseded is the one readers act on. Over moq-transport that timeout now reads as a retryableInternal(a cut, asked again once per route) instead of a terminal hole, as every unregistered condition already does there. Nothing outside tests aborts a group withError::Timeoutor a JSTimeoutErrortoday (control timers sendControlTimeout), so this is the rule for a future one, not a change anyone sees now.DELIVERY_TIMEOUTasOldonly on subgroup streams and keep it terminal on FETCH streams. A relay answering a fetch from a subscription copy that goes stale resets the fetch asOld(round 1's finding), which must recover; the recovery thatOldbuys is one fetch per route generation (rs/moq-net/src/model/resume.rspoll_serving), the same asINTERNAL_ERRORalready got.DELIVERY_TIMEOUTfor a publisher's own timeout too (round 2's version). Readers would skip a failed group as superseded.INTERNAL_ERRORanyway, and it adds a value the registry does not have.CANCELLED, which a downstream subscriber recovers elsewhere. Resetting each with its own code, as JS and moq-lite do, would turnEvictedinto a cut downstream, a behavior change with no reader asking for it.moq_error_is_supersededbesidemoq_error_is_authwould reach py, swift, kt, go, dart and cpp, but no wrapper reads groups past a superseded one today: moq-ffi's ordered reader and libmoq already skip internally.Waiting
rs/moq-net/src/ietf/error.rs:67). An application that callsFinished::abort(Error::Timeout)on a group after accepting a moq-transport FETCH now resets it withINTERNAL_ERROR, which the fetcher retries and, while the route may still move, waits on, where before it got a terminalDELIVERY_TIMEOUT. Nothing in the repository aborts a group with a timeout outside tests, andFinished::abort(Error::Cancel)already waits the same way on both wires. Two refutations did not settle it, soquest reviewstopped for your pick:Error::Timeoutby hand, over moq-transport only, and gets the existing retryable-abort policy.OldasINTERNAL_ERROR,DELIVERY_TIMEOUTread as a terminal timeout) and useDELIVERY_TIMEOUTfor superseded only on subgroup streams. Needs the uni stream's registry picked after its header in Rust and JS, for an abort nothing sends today.Overlap with #9719
moq-dev/moq#9719 (head
2646e0f7a2) merges with this branch without conflicts (git merge-tree). Its hunks inrs/moq-net/src/ietf/publisher.rs,rs/libmoq/src/consume.rs,rs/moq-ffi/src/consumer.rs, and the moq-json and moq-hls readers sit away from the lines changed here, and the new libmoq test builds its subscription frommoq_subscription_defaults()so #9719 movingpriorityandorderonto ranges does not break it.Validation
quest gate just check: passed on the head.quest gate just test interop --all: all checks passed.rs/moq-net/tests/integration/superseded_group.rs: over moq-lite-03, 06, 07-wip and moq-transport-18, 22, 23, a remote reader holding a group an on-demand producer's drop left open reads it as superseded and then gets the next producer's group; a publisher'sApp(7)abort never reads as superseded. Before the publisher fix the moq-transport rounds never ended the held group.rs/libmoq/src/test.rsraw_track_reads_past_a_group_a_drop_left_open: the C raw reader over a real QUIC session reads on to the next producer's group on moq-lite-06 and moq-transport-22. Without the publisher fix it fails on moq-transport-22 with-2.coding::codes::a_superseded_group_reads_as_one_across_every_wirechecks every negotiated version, including that a publisher's own timeout is never superseded on any wire; the JS error and stream tests mirror it, including a bareReader.stop(StreamCode.DeliveryTimeout), which now goes through the same translation.Models
Size: M
Implementer: Claude Code, claude-opus-5-5, unknown (arm A)
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: 1a43453, named in full once no reviewer reports a finding
Base: origin/main at 0275260
Risk: high,
It changes the wire on frozen moq-transport versions: a superseded group now resets with DELIVERY_TIMEOUT instead of INTERNAL_ERROR, and a received DELIVERY_TIMEOUT now reads as superseded instead of a failure, so deployed moq-transport peers and relays that send or read these codes see different behavior, and a revert cannot undo what peers have already received. Rust, JS, and Go consumers of moq-net and the bindings also see the changed `from_stream_code` mapping, though the additions (`Error::superseded`, `superseded()`) are additive.Classified: high by Claude Code, claude-haiku-5-5, low effort, session
064cc9f7-0d30-4b7c-a672-f835e3cbf667Risk file: bb7b1c0de60b
Reviewer: Codex, gpt-6.2-sol, high effort
Session:
01a220b6-dfb7-77e1-a1c2-0ec3c279c9eb, round 3Score: 6/10,
The wire change needs rework because it turns an explicit publisher delivery timeout into a wait that can outlast the FETCH indefinitely.Rounds: 5; first round 2 (medium 2); findings 3 (medium 3): fixed 2, refuted 0, open 1
Findings, open until the next round settles them:
rs/moq-net/src/ietf/error.rs:67:Keep publisher timeouts terminal after FETCH_OKThe last round's findings, at 1a43453:
rs/moq-net/src/ietf/error.rs:67:Keep publisher timeouts terminal after FETCH_OK;The cited retry branch already applied to CANCELLED, but this patch newly sends timeouts from the public Finished::abort API (rs/moq-net/src/model/group.rs:2843) into that branch (rs/moq-net/src/model/resume.rs:4652) by replacing terminal DELIVERY_TIMEOUT with retryable INTERNAL_ERROR.Reviewer: Claude Code, claude-opus-5-5, high effort, second
Session:
4792011c-2e8d-4cad-a636-9bab62f702ca, round 2Score: 9/10,
Earlier finding 2 stays fixed: JS `toStreamCode` still sends a publisher's own timeout as INTERNAL_ERROR (js/net/src/error.ts:390), and Rust's path is unchanged. The changes since 4af6b014 only update docs and route JS `stopReason` through `toStreamCode`, which applies the same per-registry translation, so they cause no new problem.Rounds: 3; first round 1 (medium 1); findings 1 (medium 1): fixed 1, refuted 0, open 0
Findings: none