Skip to content

fix(moq-mux): the TS follower judges a publisher leaving by its error's retry answer - #9070

Merged
kixelated merged 2 commits into
mainfrom
quest/m2/ts-follow-retry
Nov 18, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest/m2/ts-follow-retry

Conversation

@kixelated

@kixelated kixelated commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

moq_mux::container::ts::follower::left now asks moq_net::Error::retry whether the publisher left, instead of matching moq_net::Error variants, so the TS export and moq-gst's moqsrc agree on what ends a run. It keeps Remote(_) as the one case it still matches, since over moq-transport a relay's lost upstream and a publisher's own failure both end with an unregistered code.

Settled by the maintainer in #8955: a cancel, GOAWAY, or INTERNAL_ERROR reset counts as the publisher leaving, as moqsrc does.

Public API and wire

None. A Follower now waits out its follow (instead of failing at once) on Cancel, Closed, GoingAway, Dropped, and the stream codes Internal, Cancel, GoingAway, and ControlTimeout. A stitched replacement failing with one of them before it commits also keeps the old program instead of failing the export.

Tests

a_follower_fails_at_once_on_its_own_failure now uses verdicts (MalformedTrack, NotFound, stream MalformedTrack); a_follower_waits_out_the_follow_on_a_lost_route adds Cancel, GoingAway, and stream Internal / GoingAway.

Validation

cargo test -p moq-mux --lib container::ts (769 passed) and just check pass. No other behavior to exercise: the change is a pure error classification, pinned by the two tests above.

Models

Size: S
Implementer: Claude, claude-sonnet-5-5, unknown effort (arm B)

(Written by Sonnet 5.5)

Review

Rewritten by quest review after each round.

  • Head: 796de52

  • Base: origin/main at 0a4a977

  • Risk: medium, the base has no RISK.md to name what is always high or customer-facing, so every change is medium

  • Classified: medium by default

  • Reviewer: Codex, gpt-6.1-sol, medium effort

  • Session: 01a1ecf6-eeae-70c1-b4e7-63f9247c2712, round 1

  • Score: 9/10, The focused implementation matches the intended retry behavior and preserves the moq-transport exception, with no actionable defects found by source review; tests were not run as instructed.

  • Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0

  • Findings: none

kixelated and others added 2 commits November 17, 2026 20:01
…'s retry answer

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title The TS follower judges a publisher leaving by its error's retry answer fix(moq-mux): the TS follower judges a publisher leaving by its error's retry answer Nov 18, 2026
@kixelated
kixelated marked this pull request as ready for review November 18, 2026 04:43
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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 10 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

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: 75f89b6c-f3ea-463f-8320-6f2115440779
Commits

Reviewing files that changed from the base of the PR and between f1eecd3 and 796de52.

Files selected for processing: 3

  • quest/m2/ts-follow-retry.md
  • rs/moq-mux/src/container/ts/export_test.rs
  • rs/moq-mux/src/container/ts/follower.rs
  • 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.

Share

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Approach: sound — left asks moq_net::Error::retry whether the source failed to deliver instead of keeping a second, hand-maintained variant list, so the TS export and moqsrc share one rule; keeping Remote(_) as the single matches! is the moq-transport exception the maintainer settled in #8955.

Reviewed changes

  • left classification. The old true set survives intact (every previously matched variant is Retry::Same or Reroute), and the newly counted codes are exactly the delivery failures retry names: Cancel, Closed, GoingAway, Dropped, GoawayTimeout, and stream Internal / Cancel / GoingAway / ControlTimeout.
  • Call sites. All four uses in container/ts (follower.rs Running/Resuming/poll_switch, export.rs prepare_pending/leave) now follow the same rule, so a left failure retires the program and reports the error after the buffered tail instead of failing mid-stream. With the default --follow 0s the follower still reports the error immediately.
  • Docs. Both comments now state the retry rule and the moq-transport PUBLISH_DONE exception rather than enumerating variants, which keeps them from drifting again.
  • Tests. a_follower_fails_at_once_on_its_own_failure pins the verdicts (MalformedTrack, NotFound, stream MalformedTrack) and a_follower_waits_out_the_follow_on_a_lost_route adds Cancel, GoingAway, and stream Internal / GoingAway. I re-ran the suite: the 20 a_follower_ tests pass, and full container::ts is 749 passed with only the 20 sandbox-only missing-ffmpeg/ffprobe failures, consistent with the author's 769.
  • Quest. quest/m2/ts-follow-retry.md is removed in the same PR as other landed quests, and no reference to it remains in the tree.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash | 𝕏

@kixelated
kixelated added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 4bcae73 Nov 18, 2026
10 checks passed
@kixelated
kixelated deleted the quest/m2/ts-follow-retry branch November 18, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant