Skip to content

test(mux): cover retained jitter clock rules independently - #7722

Merged
kixelated merged 6 commits into
mainfrom
quest/m1/cut-audit/jitter-rule-tests
Nov 5, 2026
Merged

kixelated merged 6 commits into
mainfrom
quest/m1/cut-audit/jitter-rule-tests

Conversation

@kixelated

@kixelated kixelated commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The previous jitter audit retained three acquisition rules without a test that failed for any one rule's removal. This completes quest/m1/cut-audit/jitter-rule-tests.md.

Approach

Add three paused-time tests using real buffer admission and output:

  • stale: distinguish arrival from read time, checking cached frames read before, exactly at, and after their deadlines.
  • unheard_lag: drain the old horizon before restarting, so only the unheard audio track's measured lead can preserve its delay.
  • Horizon shift: hear every expected track during acquisition, so unheard lag is zero; check that both the export clock and issued deadlines follow the old queued tail.

Delete the completed quest and its epic reference. That was the epic's last child, so quest/m1/cut-audit/README.md now carries a size, [S], for its own remaining work: rerunning the children's reproductions against the release candidate. All production code remains unchanged.

Impact

  • Public API: none.
  • Wire: none.
  • Runtime behavior: none; tests only.

Choices made without asking

  • Use the existing paused Tokio test style, exercise real acquisition inputs, and leave all runtime rules intact.
  • Size the now childless cut-audit epic [S], as quest check requires.

Alternatives

Directly asserting helper results would couple tests to implementation. These cases exercise acquisition and output through the buffer. No rule was removed or changed.

Validation

At merged head 8a6ae9cca18d0b2f4e97d82d5082af4ee8cbba5c (main at e113c065bb merged in, including moq-dev/moq#7799's jitter.rs changes):

  • quest gate just ci origin/main: exit 0. Rust tests: 4,565 passed, 64 skipped. The earlier C-binding failure (moq-c test::raw_track_subscription_options_and_update) was a test bug, fixed by moq-dev/moq#7745.
  • moq-mux lib baseline (cargo nextest run -p moq-mux --lib --no-fail-fast): 2,071 passed, 3 skipped.
  • Knockouts were rerun on the merged head, with one full moq-mux lib run per rule removed. Each had exactly one failure: 2,070 passed, 1 failed, 3 skipped. They ran without the clippy warnings=deny wrapper so a knockout's dead code still compiles.
Rule removed Only failing test
stale (judge never reports stale) jitter::tests::acquisition_drops_timely_arrivals_only_when_read_past_their_deadline
unheard_lag (returns zero) jitter::tests::a_restart_without_an_old_tail_keeps_an_unheard_tracks_delay
Horizon shift (no anchor adjustment) jitter::tests::a_restart_hearing_every_track_keeps_deadlines_after_the_old_tail
  • quest check --base origin/main: 590 documents ok.

Review

Codex via quest review --base origin/main, gpt-6.1-sol, medium effort, round 1 of a new session. Reviewed head 8a6ae9cca18d0b2f4e97d82d5082af4ee8cbba5c against 2c3235eb23c530325592200d6fafbbcf45fdbf2b: no findings.

(Written by Claude Opus 5.5)

kixelated and others added 4 commits November 3, 2026 02:50
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
@kixelated kixelated changed the title Each export-clock rule kept by the jitter audit has its own test test(mux): cover retained jitter clock rules independently Nov 3, 2026
@kixelated
kixelated marked this pull request as ready for review November 5, 2026 06:03
@coderabbitai

coderabbitai Bot commented Nov 5, 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 15 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: d7348510-76aa-4810-900a-7885ee8d4a53
Commits

Reviewing files that changed from the base of the PR and between e113c06 and 8a6ae9c.

Files selected for processing: 3

  • quest/m1/cut-audit/README.md
  • quest/m1/cut-audit/jitter-rule-tests.md
  • rs/moq-mux/src/jitter.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.

Reviewed changes

  • unheard_lag isolated: a_restart_without_an_old_tail_keeps_an_unheard_tracks_delay drains the old horizon before restarting with only video, then sends audio late at decode 5000. The restarted clock must anchor on the previous lead difference so video waits; removing unheard_lag releases video at acquisition end and fails the first due assertion.
  • Horizon shift isolated: a_restart_hearing_every_track_keeps_deadlines_after_the_old_tail hears both tracks during acquisition (so unheard_lag is zero) while an old v400 tail is still queued. It asserts both Buffer::at(1, ms(5000)) and the emitted deadlines follow that tail; without the anchor adjustment the restart frames fall due at acquisition end.
  • stale boundary isolated: acquisition_drops_timely_arrivals_only_when_read_past_their_deadline covers deadlines at 99/100/101 ms against a 100 ms read: 99 is trimmed as stale, 100 is kept exactly at the boundary, 101 is kept. Removing stale queues the 99 ms frame and fails.
  • Quest bookkeeping: deletes the completed jitter-rule-tests.md, drops its ## Required entry, and sizes the now-childless cut-audit epic [S].

I traced each test through judge/queue/acquired/unheard_lag/ends and the test helpers: all three are deterministic under paused time (drift stays zero in their short spans) and each fails only when its target rule is removed. cargo fmt --check -p moq-mux is clean, and no tracked file references the deleted quest. No production code changed.

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@kixelated
kixelated added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit d1f07c3 Nov 5, 2026
12 checks passed
@kixelated
kixelated deleted the quest/m1/cut-audit/jitter-rule-tests branch November 5, 2026 08:03
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