Skip to content

quest(m2/audio-playout): replay the publisher's largest group at tune-in - #8789

Merged
kixelated merged 3 commits into
mainfrom
plan/audio-playout-replay-largest
Nov 15, 2026
Merged

kixelated merged 3 commits into
mainfrom
plan/audio-playout-replay-largest

Conversation

@kixelated

@kixelated kixelated commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The audio-quality replay can't measure #8761's backlog reports. Its local track learns its largest group from the first group to land, which for relay-mic-rtt40 is the stale tune-in frame (group 7499). That sits below the backlog the consumer closes, so the replay reports nothing and the row still reads 320 ms. CodeRabbit also flagged a Promise.race in #8761's backlog test helper that the repo's guideline says to replace with the scoped race helper.

Approach

  • New quest quest/m2/audio-playout/replay-largest.md under the audio-playout epic, with every decision settled:
    • Traces carry a required largest (version 4).
    • New captures record it by the consumer's rule.
    • Checked-in traces derive it: the live edge at the first arrival, at the path's lowest lag (group 8994 for relay-mic-rtt40).
    • The replay's subscriber answers it as a wire subscriber would.
    • Rows that move are re-budgeted.
  • Test cleanup: js/hang/src/container/consumer.backlog.test.ts (from feat(hang,moq-mux,moq-audio): both consumers report the join's backlog they skip #8761, now on main) races its outstanding read with the scoped race from @moq/signals instead of Promise.race. It derives the read's settle once per read, so each pass adds no listener to it.

Decisions

  1. Maintainer: plan the replay change as an m2 quest under audio-playout, and fold CodeRabbit's nitpick into this PR.
  2. Derive the old traces' largest rather than re-record them. Re-recording needs a person at the MacBook's microphone and would move every column of the baseline. Measured locally with the derived 8994, relay-mic-rtt40 reads target p95 120 ms (from 320); group 9047 (the whole backlog) measures the same row.
  3. The replay wraps its local subscriber's largest() rather than adding API to @moq/net or the consumer, or creating an empty group head the recording never saw.

Impact

None at runtime: a quest plan and a test helper.

Validation

  • quest check --base origin/main
  • just check
  • bun test src/container/consumer.backlog.test.ts: 5 pass
  • Codex review (quest review --harness codex): no findings

Models

Size: XS
Implementer: Claude, claude-opus-5-5, unknown effort

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

kixelated and others added 3 commits November 14, 2026 21:12
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Derive the read's settle once per read and race it with race(), so each
pass adds no listener to the outstanding read. The replay quest no longer
waits on #8761, which merged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review November 15, 2026 05:36
@coderabbitai

coderabbitai Bot commented Nov 15, 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 2 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: c2a50df5-5aa8-4660-a00b-64afa07bb891
Commits

Reviewing files that changed from the base of the PR and between 9a1e0b9 and cacec2a.

Files selected for processing: 2

  • js/hang/src/container/consumer.backlog.test.ts
  • quest/m2/audio-playout/replay-largest.md
  • 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

Reviewed the full diff (2 files, 3 commits).

  • Backlog test helper: consumer.backlog.test.ts swaps Promise.race for the scoped race from @moq/signals. It derives the read's settle (.then(() => true)) once per read, so each pass adds no listener to it. race exists and is exported from js/signals/src/index.ts, and the call shape matches.
  • New quest: quest/m2/audio-playout/replay-largest.md plans the largest field (trace version 4), its capture and derivation, the replay subscriber wrapper, and the budget updates. It is internally consistent and scoped to the epic.

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

@kixelated
kixelated added this pull request to the merge queue Nov 15, 2026
Merged via the queue into main with commit d1c025a Nov 15, 2026
7 checks passed
@kixelated
kixelated deleted the plan/audio-playout-replay-largest branch November 15, 2026 05:59
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