Repository navigation
Conversation
Quest-Claim: 0ee91d89f42f2837
A lite publisher called closeViolation on every error from the track it served, so a decode error (marked malformed) or a violation an upstream session put on the track closed the downstream session too. Only this session's own decodes close it now, and a group frame this hop cannot decode reaches downstream as MalformedTrack, mirroring Rust. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A served track or group carrying another session's ProtocolViolation was reset with SESSION_CLOSED although this session stays open. Map it to MalformedTrack, and cover both the decode and the violation case with relay-chain tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Neither gates the 0.22.0 cut or lite-07, and neither breaks API or wire. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rack The TRACK and TRACKS resets, the SUBSCRIBE and FETCH resolve resets, SUBSCRIBE_DROP, and SUBSCRIBE_END's error code now read a served track's ProtocolViolation as MalformedTrack too, rather than SESSION_CLOSED on a session that stays open. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
November 28, 2026 10:44
Contributor
|
Warning Review limit reachedYou'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. View limit details
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. |
This branch has not been deployed
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 quest
quest/m1/js-data-errors-stay-on-their-track.md(deleted here).Summary
A JS node that republishes a track used to drop every broadcast on a downstream lite session because of one bad group from upstream. The lite publisher called
closeViolationon every error raised while serving a track. So a decode error from another session's Group Stream (marked malformed byReader), or aProtocolViolationanother session put on the track, closed the downstream session with "invalid control encoding" (code 3).lite/publisher.ts:runSubscribe, the fetch serve, andrunDatagramsno longer callcloseViolationin their catch-alls, which mostly see the served track's errors. The only decodes of this session's own input inside them, the datagram and legacy-datagram update readers, now call it where they fail.SubscriptionControlsalready closed the session for its own update decodes. This mirrors Rust, where the publisher'smalformedflag is set only from its own requester decode (rs/moq-net/src/lite/publisher.rs).lite/group.ts:readFramesturns a frame decode error intoStreamError(MalformedTrack). Downstream now sees 0x12 instead of an internal 0, as Rust'sStreamError::from(Decode)maps it.lite/error.ts:closeViolation's comment says to pass only this session's own input errors. A newservedErrormaps aProtocolViolationcarried by a served track or group toStreamError(MalformedTrack). The publisher's runSubscribe, fetch, and group-serve resets use it, so downstream never reads SESSION_CLOSED on a session that stays open.toStreamCodeis unchanged, since Rust also maps its own violations to a session code.Rust check: it has no such leak. Session close goes through
lite::error::controlat control-stream boundaries, and the publisher's malformed verdict is a local flag, not something the error value carries.Dropped: scoping the mark in the model producers'
abort. It would have caught the IETF path too, but it changes what local readers see: 19 tests deliberately check that aProtocolViolationreaches the subscribed track's readers.Public API / wire impact
No API change. Behavior: a downstream lite session stays open when an upstream group is malformed or an upstream session violated the protocol, and a group a JS hop cannot decode is reset downstream with MalformedTrack (0x12) instead of 0.
Caused by
closeViolationto the lite publisher's serve catch-alls, which also see errors other sessions put on the served track (found by person, through thegroup-id.test.tsrelay chain in moq-dev/moq#9266)Validation
js/net/src/data-errors.test.ts: a lite-05 relay chain (publisher, JS forwarding hop that fails only the group it cannot read, viewer) with two broadcasts.MalformedTrack, and the second arriving proves the first left the track up. The other broadcast still delivers. Before the fix the viewer's session closed with code 3 (reproduced on the first commit).ProtocolViolation. The viewer readsMalformedTrackand the other broadcast still delivers. WithservedErrormade a no-op this test fails, receiving code 3.bun testinjs/neton the first commit: 4013 pass, 0 fail. On the head,just checkran every JS package's tests, and only the next item failed.just checkon the head (6c8dba7): every module passes except one@moq/jsontest that timed out under parallel load. That test is "a live stream passes several tails and refuses a truncated replay (compress=true)", 6.8s against bun's 5s default. It uses only the localTrackmodel (no lite session, so this change can't reach it) and passed 5 of 5 runs alone. The follow-up below tracks it.servedErrorat each one, and inSubscribeDrop.given.just checkon 7952937: passes. Alite/fit.test.tscase timed out once in a loaded targeted run and passed 3 of 3 alone.Decisions
js/net/src/lite/publisher.tsviaservedError, as review round 3 recommended (rejected: accept it; drop the PR). Applied.Follow-ups
quest/m3/json-replay-test-load-timeout.md - the
@moq/jsoneviction test times out underjust check's load. Fix by shrinking its work, not raising the timeout. No open decisions.quest/m3/js-ietf-served-violations-stay-upstream.md -
ietf/publisher.tsrethrows anyProtocolViolationfrom serving a track, so an upstream's violation still closes a downstream moq-transport session. No open decisions.Models
Size: S
Implementer: Claude Code, claude-opus-5-5, unknown (arm A, cohort advisor-2026-11)
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)