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
IETF stream resets send moq-lite error codes, so routine events read as INTERNAL_ERROR #3001
Split out of #2993, where the cancellation path was fixed narrowly and the general case deliberately was not.
Error::to_code() encodes the moq-lite space, where Cancel is 0. On the moq-transport wire, draft-19 section 3.3.4 assigns 0x0 to INTERNAL_ERROR and 0x1 to CANCELLED. Every IETF stream reset that goes through Reader::abort/Writer::abort therefore sends a code from the wrong registry.
The most visible case is ietf/session.rs, where a failed run_uni_group does reader.abort(&err). A group arriving for an alias the subscriber retired by its own cancellation is an expected late object, and it stops the stream with 0 -- the publisher reads a routine event as an internal failure on our side.
#2993 fixed exactly one site (cancel_subscribe, via a named STREAM_CANCELLED and a raw-code Reader::stop) because it could be shown safe there: the publisher treats its request stream reader closing as Ok(()) and never inspects the code.
The general fix is not a matter of passing 1 at each remaining site, which is why it was not folded in:
Error::from_transport maps only 0 back to Cancel. Changing outgoing codes without it makes two moq-net IETF peers disagree, so a routine cancellation surfaces as Remote(1) and can move an expected event into error paths.
Both directions have to change together, and the mapping is shared with moq-lite, whose code space is unrelated.
So this wants a per-protocol code mapping (outgoing and incoming) rather than a scattering of literals. The js/net counterpart is #2999: there the abstraction cannot express a code at all.
Half of this landed in #2993 (c5e26f2): ietf::error names the section 3.3.4 registry and maps an error onto it, and the IETF paths that stop a stream now use it, so a cancellation reports CANCELLED rather than moq-lite's 0.
The reason given for deferring the whole thing was wrong. I claimed the outgoing change needed the incoming one to avoid two moq-net peers disagreeing; the publisher discards its group task results and never reads the code, so it did not.
What remains is genuinely the incoming direction: Error::from_transport decodes 0 back to Cancel for every protocol. On the moq-transport wire 0 is INTERNAL_ERROR, so a peer reporting a real internal failure is read as a routine cancellation. Fixing it needs the decode to know which protocol the stream belongs to, which the shared coding layer currently does not.
Activity
fix(moq-net): stop IETF streams with moq-transport error codes
kixelated commentedon Aug 22, 2026
Half of this landed in #2993 (c5e26f2):
ietf::errornames the section 3.3.4 registry and maps an error onto it, and the IETF paths that stop a stream now use it, so a cancellation reports CANCELLED rather than moq-lite's 0.The reason given for deferring the whole thing was wrong. I claimed the outgoing change needed the incoming one to avoid two moq-net peers disagreeing; the publisher discards its group task results and never reads the code, so it did not.
What remains is genuinely the incoming direction:
Error::from_transportdecodes 0 back toCancelfor every protocol. On the moq-transport wire 0 is INTERNAL_ERROR, so a peer reporting a real internal failure is read as a routine cancellation. Fixing it needs the decode to know which protocol the stream belongs to, which the sharedcodinglayer currently does not.(written by Opus 5)
fix(quest): move the stream-code quest to m1, and scope the benchmark
kixelated commentedon Oct 19, 2026
Fixed by #3450: IETF reset codes are encoded and decoded per negotiated draft.
(Written by Claude Opus 5.5)