Repository navigation
Conversation
…ed drain A finished track's last group ages out of a live-edge export once its span passes on the clock (#8638), so a host as slow as CodSpeed's simulation exported only the header and failed container-export/flv/1x16. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound. Pausing the tokio clock in the bench removes the host-speed dependence directly, and the bench is the right place to fix it because moq-net's aging behavior from #8638 is intended.
Reviewed changes
Reviewed the single commit touching rs/moq-mux/benches/export.rs.
paused()helper: builds a current-thread runtime withstart_paused(true), so the clock stands still between setup and the timed drain.bench_exportandvideo_reorder: both use the helper instead of their own unpaused runtimes. This matchesbenches/catalog.rsandbenches/jitter.rs.
claude-sonnet-5-5 | 𝕏
|
No actionable comments were generated in the recent review. WalkthroughA new helper builds a current-thread Tokio runtime with all drivers enabled and the clock initially paused. Merge Risk:
|

Problem
Every scheduled CodSpeed (mux) run since 2026-11-15 panics in
container-export/flv/1x16:assert_eq!(chunks, 1 + tracks * frames), left 1, right 17. The export emits only its header.The bench writes a finished broadcast (16 frames, 20 ms apart, one group) in setup, then drains a live-edge export (max delay zero) in the timed routine. Since moq-dev/moq#8638, moq-net ages a finished track's last group from its arrival plus its span (
TrackState::ended_atinrs/moq-net/src/model/track.rs). Once the clock passes that, a zero-budget subscription is served nothing. CodSpeed's simulation is slow enough that more than the 300 ms span passes between setup and drain, so the only group is stale before the export reads it.This is the documented, maintainer-accepted behavior from #8638 ("a finished or paused track's last group expires without a successor, but not before that end"), not a moq-mux consumer bug: with a 400 ms gap the container consumer never receives a group from the subscription.
Approach
The export and video-reorder benches run on a paused tokio runtime, so the clock stands still between setup and the timed drain and the result no longer depends on how fast the host is. This follows
benches/catalog.rsandbenches/jitter.rs. The idle-poll bench is unchanged: its track is live, so nothing ages.Validation
ended_at.std::thread::sleep(400ms)beforeprofiled_export,cargo bench -p moq-mux --bench export -- container-export/ --testpasses all 27 cases on the paused runtime; withstart_pausedremoved it panics atflv/1x16, left 1, right 17. The experiment is not committed.cargo bench -p moq-mux --bench export -- --test: all 66 cases pass.just checkpasses.Caused by
Impact
None: bench-only. No public API or wire change.
Alternatives
@moq/hang's: neither drops the group; the subscription never delivers it.Waiting
moqexport of a finished broadcast at the default delay gets nothing. Recommendation: keep it, since a live-edge reader asked for nothing older than the edge and a recorder asks for history with a max delay, as the FLV tests'RECORDING_MAX_DELAYdoes.Follow-ups
chunks > 0, which the PAT/PMT satisfy, so they likely measured a header-only export since 11-15 too. The paused clock fixes that; tightening the TS assertion is optional.Models
Size: S
Implementer: Claude Code, claude-opus-5-5, unknown effort
(Written by Opus 5.5)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: bb48c96
Base: origin/main at 4f3ba33
Risk: medium,
the base has no RISK.md to name what is always high or customer-facing, so every change is mediumClassified: medium by default
Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1efc1-00e0-7580-b57b-91d7b90f486d, round 1Score: 9/10,
The change narrowly prevents host delays from expiring benchmark fixtures without changing production behavior, and no actionable defect was found; builds and tests were not run.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none