Skip to content

test(moq-audio): replay the subscription budget trace natively, finishing audio playout - #9475

Merged
kixelated merged 2 commits into
mainfrom
quest/m2/audio-playout/README
Nov 23, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest/m2/audio-playout/README

Conversation

@kixelated

@kixelated kixelated commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Claims quest/m2/audio-playout/README.md and finishes the epic.

Closes #2812

Problem

The epic's last owed item: the browser's playout.test.ts "subscription budget" trace replayed through the native decode path too, asserting the same target series. Without it nothing shows moq play's subscription reaches a flush that starts after the target settled at its floor, rather than skipping the oldest packets of each flush before the estimator sees them.

Approach

Two tests in rs/moq-audio/src/decode/consumer.rs replay the same trace (a minute of 20 ms packets over a 50 ms path, then six seconds flushed six at a time) through Consumer, one PCM packet per group, every packet of an arrival landing before any is read:

  • the_subscription_reaches_a_flush_that_starts_after_the_target_settled: moq play's budget (delay plus the 2 s reach, floored at the 2 s it opens with). Asserts the browser's checks (40 ms at the end of the paced minute, every packet decoded, the first twenty flushes reaching at least 120 ms) and that the series equals the estimator fed every arrival directly.
  • a_budget_following_the_delay_drops_the_flush_it_should_measure: the counter-case, max delay following the delay, drops packets and stays under 120 ms, so the first test cannot pass vacuously.

The epic's README is deleted and its links updated: audio-calibrate loses its Required (its wait now names this PR), the playout-library and bufferbloat quests point at doc/concept/audio-jitter.md, and Nightly's README drops the stale note that the audio near-zero p95 row belongs to this epic (Audio quality passed on the 11-20, 11-21 and 11-22 scheduled Nightlies).

Impact

None: tests and quest files only. No public API or wire change.

Validation

  • cargo test -p moq-audio --lib: 292 passed. just check and just ci pass.
  • Differential against the browser: dumped both players' per-arrival target series for the reach budget (temporary writes, reverted). 3050 values each, exactly equal (max difference 0.0); both read 40 ... 40, 140 ... across the onset. The counter-case matches too: 3248 of 3300 packets delivered and an onset of 80 ms on both.

Decisions

  • Interpreted the owed "recorded trace" as playout.test.ts's subscription-budget trace, which the line names. The corpus's recorded join/skipped cases are already covered natively by the estimator corpus test and the join-backlog decode-path tests from feat(hang,moq-mux,moq-audio): both consumers report the join's backlog they skip #8761.
  • The native test asserts the series equals the native estimator fed directly, rather than a checked-in copy of the browser's series: the corpus already holds both estimators to one reference, so a fixture would duplicate it. The exact cross-player match is in Validation.
  • Closes #2812: the quest's Closes named it for when the epic finishes.
  • The calibration counts Nightlies after this PR merges, as it counted after the epic's last child.

Follow-ups

None.

Models

Size: M
Implementer: Claude Code, claude-opus-5-5, unknown effort

Review

Rewritten by quest review after each round.

  • Head: be27331

  • Base: origin/main at 1767f6d

  • Risk: low, Nothing a consumer or peer relies on changes: the Rust change adds only `#[cfg(test)]` tests in `rs/moq-audio/src/decode/consumer.rs`, the JS change adds one comment in a test file, and the rest rewrites or deletes quest plan docs, which RISK.md lists as low; if something breaks, it is a failing test or a stale doc link, and a revert undoes all of it.

  • Classified: low by Claude Code, claude-haiku-5-5, low effort, session 9e85f34d-a612-429d-b0d9-d733142455a5

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

  • Session: 01a208cd-6de8-7e82-b8cc-bda82aaec149, round 1

  • Score: 9/10, No actionable defects were found by source review; builds and tests were not run as requested.

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

  • Findings: none

kixelated and others added 2 commits November 23, 2026 06:13
…ive decode path

Finishes the audio playout epic: moq play's budget lands every flush whole and
measures the browser's target series; a budget that only follows the delay drops
the flush it should measure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title Audio playout test(moq-audio): replay the subscription budget trace natively, finishing audio playout Nov 23, 2026
@kixelated
kixelated marked this pull request as ready for review November 23, 2026 14:28
@coderabbitai

coderabbitai Bot commented Nov 23, 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 37 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: 66aba646-fd51-45c4-8112-28d12d91d10e
Commits

Reviewing files that changed from the base of the PR and between 1767f6d and be27331.

Files selected for processing: 8

  • js/watch/src/audio/playout.test.ts
  • quest/m0/nightly/README.md
  • quest/m2/README.md
  • quest/m2/audio-playout/README.md
  • quest/m3/audio-calibrate.md
  • quest/m3/audio-playout-library.md
  • quest/m4/audio-bufferbloat-av.md
  • rs/moq-audio/src/decode/consumer.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

@kixelated
kixelated enabled auto-merge November 23, 2026 14:29

@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. The PR replays the browser's subscription-budget trace through the native Consumer and checks it against the native estimator fed directly. Because the conformance corpus already holds both estimators to one reference, this closes the native gap without adding a duplicate fixture.

Reviewed changes

Reviewed the full diff: the two native decode-path tests and the quest-doc cleanup that finishes the epic.

  • Native trace replay: flushes() reproduces trace(300, 6, 0) exactly. That is 3000 paced packets at +50 ms, then each run of six shares the arrival of its last packet. budget reads every packet up to the newest of each arrival before it samples consumer.delay().
  • Reach budget test: (delay + 2s).max(2s) matches moq play's seen.saturating_add(REACH).max(floor) in rs/moq-cli/src/play/media.rs. The test asserts the browser's three checks, and also that the series equals jitter::Target fed every arrival directly.
  • Counter-case: a budget that follows the delay drops packets and stays under 120 ms at onset, so the positive test can't pass vacuously.
  • Quest cleanup: deletes quest/m2/audio-playout/README.md. No references to it remain. Links now point at doc/concept/audio-jitter.md or #9475, and audio-calibrate drops its Required entry.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@kixelated
kixelated added this pull request to the merge queue Nov 23, 2026
Merged via the queue into main with commit fcdfe56 Nov 23, 2026
10 checks passed
@kixelated
kixelated deleted the quest/m2/audio-playout/README branch November 23, 2026 14:33
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.

Watch has Audio stutter on iOS on https://moq.dev/watch/

1 participant