Skip to content

test(mux): reproduce the live export's burst loss over a session - #5857

Merged
kixelated merged 1 commit into
mainfrom
fix/ts-live-start-session-test
Oct 17, 2026
Merged

kixelated merged 1 commit into
mainfrom
fix/ts-live-start-session-test

Conversation

@kixelated

@kixelated kixelated commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

#5854 fixed the MP2 holes in TS validation, but its tests check the mechanism's inputs: the budget on the first SUBSCRIBE, and the local latch. Nothing reproduces the loss itself deterministically; its repro was 24 staggered joiners under load.

Approach

a_live_start_loses_no_group_the_publisher_bursts (in rs/moq-mux/src/container/source.rs) runs a real lite-07 session over moq_net::transport::memory, with paused time:

  1. A live ExportSource subscribes, and the publisher writes group 0.
  2. The publisher bursts groups 1..3 in one synchronous pass, one 24 ms frame per group, the way the TS import publishes a PES of MPEG-1 audio. The export reads group 0 in the meantime.
  3. Groups 4..7 follow once the session has settled.

Verified on this branch, rebased on main:

While building it I found that a front-resolved track::Subscriber::update reaches the upstream session only on the reader's next poll (resume::Reader mirrors preferences lazily). So the test keeps polling the export the way a real export task does.

This also adds the quest quest/m2/audio-join-budget.md. moq-audio's Start::Latest join with a warmup subscribes with just the warmup and widens after the first frame (joining_latest), the same narrow-then-widen shape, so it should be checked for the same race.

Impact

  • No public API or wire change. Test and quest only.

Alternatives

  • None worth weighing: this only adds coverage for a fix that already landed.

Follow-ups

  • quest/m2/audio-join-budget.md, above.

(written by Claude Opus 5.5)

🤖 Generated with Claude Code

Base automatically changed from fix/ts-live-start-budget to main October 17, 2026 14:28
The TS validation flake lost MPEG-1 audio groups right after the join: the
export subscribed with a zero budget and widened it after its first read, and
the publisher skipped every group of a PES burst but the newest until the
widening landed. Reproduce that deterministically over a lite-07 session on
the in-memory transport. On main the export reads [0, 72000, 96000, ...], the
CI signature exactly; with the budget on the first SUBSCRIBE nothing is lost.

Also file a quest for moq-audio's Start::Latest warmup join, which narrows and
then widens its budget the same way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated force-pushed the fix/ts-live-start-session-test branch from ae82021 to 754a5af Compare October 17, 2026 14:50
@kixelated
kixelated marked this pull request as ready for review October 17, 2026 14:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T14:52:43.621230Z 754a5af Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 17, 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 12 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
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 103bb985-fb57-4994-83bd-85b066d8fa1a
📥 Commits

Reviewing files that changed from the base of the PR and between 2736815 and 754a5af.

📒 Files selected for processing: 3
  • quest/m2/README.md
  • quest/m2/audio-join-budget.md
  • rs/moq-mux/src/container/source.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

Comment @coderabbitai help to get the list of available commands.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merging. This adds test and quest only, rebased on main after #5854.

  • The regression test passes on main, and fails with fix(mux): put a live export's budget on its first SUBSCRIBE #5854 reverted, reproducing the CI signature ([0, 72000, 96000, ...]).
  • Required checks (Check, Test) pass. Codex reviewed this head with no findings.
  • The optional TS validation check failed on this run: one MP2 hole in "TS full multiplex at its own rate" (skipped=120ms, declared 60 ms after subscribing). This head already carries fix(mux): put a live export's budget on its first SUBSCRIBE #5854, whose 450 ms budget is on the first SUBSCRIBE, so a second cause remains on main. This PR changes no runtime code, so it neither causes nor fixes that. I'm reporting it as a follow-up.

(written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 17, 2026
Merged via the queue into main with commit 19e8f10 Oct 17, 2026
11 of 12 checks passed
@kixelated
kixelated deleted the fix/ts-live-start-session-test branch October 17, 2026 15:53
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