Repository navigation
fix(net): an END_OF_TRACK after a local unsubscribe no longer closes the session - #8769
Conversation
…the session The moq-transport subscriber refused an END_OF_TRACK marker that landed on a track its own unsubscribe had already released, which is a protocol violation that closes the whole session. A viewer following a relay's route fallback then reconnected, and the fallback missed Interop's switch bound. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…cement flake Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. WalkthroughSubscriber.handleGroup now ignores END_OF_TRACK when the track has been released but is not finished. A regression test checks that this marker does not close the session. The Interop README updates prior fix status and records November 13–14 run results, including the marker violation and separate replacement failures. Severity of issue fixed: Low Merge Risk:
|
There was a problem hiding this comment.
ℹ️ No critical issues — one test-hygiene suggestion inline.
Reviewed changes
Reviewed the full diff: the moq-transport subscriber's END_OF_TRACK handling, its regression test, and the quest notes.
- Tolerate END_OF_TRACK on a released track: the new guard in
subscriber.tsreturns early exactly when#endPendingwould throwtrack is closed. That case is a released track with no declared end. A released track that did declare an end still goes throughendTrack, so a conflicting end is still a violation. The check runs synchronously right beforeendTrack, so nothing can release the track in between. - Regression test: holds the marker's stream open, releases the track, and asserts the session is not closed.
subscribeTracknow also returns the transportpair. - Quest notes: record the 11-13 and 11-14 interop triage and the separate
replacementaudio-stall flake.
I could not run bun test here: bun install fails because @moq/libav needs Nix to build. I checked the logic against #endPending in js/net/src/track.ts by reading the code.
claude-opus-5-5 | 𝕏
|
quest land watch: ended this pull request's pick, disarming its auto-merge, since its head efab5ec is held by finding by pullfrog[bot]: (written by quest land watch) |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the one new commit since the prior pullfrog review.
- Restored test spies in
onTestFinished:Tail.prototype.openandclosespies are now restored, and the held END_OF_TRACK stream released, even when a wait or assertion fails. This addresses the prior test-hygiene suggestion;onTestFinishedis already imported.
claude-sonnet-5-5 | 𝕏
Drop #8769's group-stream guard and this branch's duplicate test: the track's wire end now ignores a late end for every path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Problem
The scheduled Interop run 43606836954 (2026-11-14,
bd617cc1e) failed onlyMedia output and lifecycle, onlive incumbent fallback playsovermoq-transport-22. The viewer's own log shows why the fallback took longer than its 1039 ms bound: its session closed withinvalid END_OF_TRACK: track is closedand reconnected.The relay forwards a withdrawn route's END_OF_TRACK while the viewer, following the route change, releases that track.
#endPendingrefuses an end on a released track, andjs/net's moq-transport subscriber turns that refusal into aProtocolViolation, which closes the whole session, every other subscription included. The publisher did nothing wrong: the track was already gone.Approach
When the END_OF_TRACK stream's track is already released with no end declared, the marker has nothing to end: return, as an already-ended subscription does. A released track that did declare an end still goes through
endTrack, so a conflicting end stays a violation. A test holds the marker's stream open, releases the track, and checks the session stays open; it fails onmain.The Rust subscriber (
end_track) reads the marker in one poll afterpoll_aborted, with no await in between, so it has no such window.Impact
@moq/netno longer closes a moq-transport session for an END_OF_TRACK that lands after the local unsubscribe.Alternatives
#endPendingignore a closed track for every caller (lite, FETCH): wider than this race, and it would hide a real contradiction elsewhere.Validation
bun test src/ietfinjs/net: 656 pass. The new test fails onmain'ssubscriber.tswithError: track is closedand passes with the change.just test media --media-cases replacementatce616b52c(no change): this PR does not make it reliable. Over 14 local runs on a host at load 50 it failed 4 times, always aslive incumbent fallback playsor the fallback audio tone, onmoq-lite-06andmoq-transport-22. The one failure whose log I kept (lite-06, no reconnect) shows no END_OF_TRACK violation, so it is a separate cause (see Waiting).Caused by
Decisions taken without the maintainer
replacementcase running on Chromium (recommended: the 2026-11-09 decision closesquest/m0/interop-green/on a pass that runs it). Since moq-dev/moq#8443 dropped its quarantine it also flakes for a second reason this PR does not fix: after a fallback the audio stalls past the 1039 ms bound, withskipping missing groupson the audio track in both failing logs. If the scheduled run keeps failing on it, quarantine it for Chromium again, as for Firefox, untilquest/m2/audio-playout/or the cluster-routing quest owns it. Rejected: wideningSWITCH_MS.poll_aborted, with no await in between.Models
Size: XS
Implementer: Claude Code, claude-sonnet-5-5, unknown effort
(Written by Claude Sonnet 5.5)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: ad39f0e
Base: origin/main at a4dee24
Risk: medium,
the base has no RISK.md to name what is always high or customer-facing, so every change is mediumClassified: medium by default
Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1dbcf-a833-74e3-bb08-a006fc7033f6, round 2Score: 9/10,
The incremental change ensures test spies are restored even on failure, with no actionable defects found by source inspection; builds and tests were not run as instructed.Rounds: 2; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none
Reviewer: Codex, gpt-6.1-sol, low effort, shadow
Session:
01a1dbcf-a833-7c42-b608-fdd5d346cff8Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0