Repository navigation
test(media): the lifecycle pages idle through the replacement section - #9494
Conversation
Quest-Claim: 1f9273ab6417effa
…st: rewrite to the lite-06 fallback residual
|
Maintainer decision (via /quest-run, 2026-11-23): ✅ land now as a partial fix, with the quest rewritten to the leftover moq-lite-06 ARM fallback (rejected: hold until the lite-06 fallback also passes). (Written by Claude Opus 5.5) |
|
Applying #9494 (comment): head 5e58140 already rewrites (Written by Claude Opus 5.5 with high) |
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound. It reduces load on the runner by idling the two lifecycle pages through the replacement section, instead of loosening the switch bound or retrying. Reusing the existing detach/reattach and disableVideo/enableVideo commands avoids launching another browser.
Reviewed changes
I reviewed all three files at 5e58140: the media harness and the two quest docs.
- Replacement section idles the lifecycle pair: before the section, the lifecycle player detaches and the test waits until it holds no resources. The lifecycle fixture stops encoding video. Afterward the video is re-enabled and the player reattaches and must reach live (
lifecycle player returns), so the cases after the section start from the same state as before. A failure inside the section throws and aborts the run, so the missing restore on that path is harmless. - Shared
detach()helper: thedetachcase now calls the same helper. It keeps theresource baselineassertion name that the leak control depends on. - Capture denial waits out
connecting: the 1 s absence window now opens only after the viewer has leftconnecting. A viewer that reachesliveinstead still fails the check, and the failure message now prints the offending sample. - Resume-sync trace origin:
traceLinenow counts from the first sample's page-clockatvalue instead of the driver'sDate.now(). This fixes the nonsensical offset printed in the trace. - Quest docs: the docs now describe the remaining
moq-lite-06fallback audio problem on ARM.
claude-opus-5-5 | 𝕏

Problem
The Nightly's
Media (firefox player)failed thereplacementcase every night since it first ran on Firefox. During the section, the 4-vCPUubuntu-24.04-armrunner, decoding in software, runs five media pages: the lifecycle fixture and player, which the section never measures, plus its own old and new fixtures and viewer. Each failing night, the lifecycle player underflowed together with the replacement viewer.Approach
replacementsection detaches the lifecycle player and waits until it holds no session, audio graph, or worker. It also disables the lifecycle fixture's video, whichonDemand: "retain"would otherwise keep encoding with no subscriber. After the section, it re-enables the video, reattaches the player, and waits for it to reach live (lifecycle player returns), so the cases after it run as before. The detach and its resource wait are now onedetach()helper, which thedetachcase shares.capture denial holds publicationnow opens its 1 s window only after the viewer leavesconnecting. A viewer reportsconnectinguntil its session could have seen an announcement, and the check requiredofflinefrom the first sample. It also prints the offending sample instead of the last one. On this x86 host,--media-cases capture-denialon Firefox failed 3 of 3 before and passes 3 of 3 after (Chromium passes too). On the ARM runner, base and fix both passed 10 of 10, so this race is not what turned the Nightly red.resume audio/video syncfailure line inwaitForLivenow traces from the first sample's page clock. It used the driver'sDate.now(), which printed+-1795469434.69s.moq-lite-06fallback's audio on ARM (see Validation).Impact
test/interop/clients/js/media.ts).replacementsection takes a few seconds longer, for the reattach and the wait for live.Validation
Differential on the Nightly's runner class (
ubuntu-24.04-arm), using a temporarypull_requestworkflow that ranjust test media --media-engines firefox --media-cases replacementfive times per job. The base variant checked out only the base'smedia.ts. The workflow is deleted from the branch.With the fix on ARM, the switch times are:
The bound is 1039 ms, and the one fix-side failure in 30 was that lite-06 fallback. Its viewer showed the incumbent's picture with its audio unanchored (
audioStalled: true,audioTimestamp: 0), after twoskipping missing groups: track=audio. The relay log shows noerr=oldin that window. On x86, the lite-06 fallback takes 308 ms. This residual is the quest's remaining work.Two full
just test media --media-engines firefoxruns on the fix (an earlier commit, without the capture-denial fix) failed before thereplacementsection, in code this PR does not change:rejoin reaches live, with audio unanchored. Its relay log has agroup error err=old, the mechanism moq-dev/moq#9492 (quest/m0/interop-green/reattach-old-groups.md) owns.resume audio/video sync: reattach reaches live: offset 800ms. It was seen once, with noerr=old. The Nightly triage owns it if it recurs.Local (x86, host load 9–14 of 24 CPUs):
replacementon Firefox passes.just test media --media-engines chromium,firefoxpassed all three replacement wires within the full sequence, and every case after it on Firefox. Chromium failedaudio tone: after codec renameat 67/75 samples, a case that runs before this PR's change.just checkpasses.Caused by
connectinginstead ofofflinewhile its connection is down, but leftcapture denial holds publicationrequiringofflinefrom the first sample (found by check).replacementsection has run five media pages since it was added. It surfaced when Firefox on the ARM runner first reached the case.Alternatives
media.tsinvocation, without the lifecycle pages. It would cost another browser launch and cold start per engine, which detaching avoids.Follow-ups
None new. The lite-06 fallback residual stays in this PR's quest, rewritten. The
rejoinfailure belongs to moq-dev/moq#9492.Decisions
moq-lite-06ARM fallback (rejected: hold until the lite-06 fallback also passes). The load fix moves the Nightly's failure rate on its runner class from 16 of 20 to 1 of 30, and the residual is a separate cause. Decided by the maintainer in test(media): the lifecycle pages idle through the replacement section #9494 (comment).Models
Size: M
Implementer: Claude Code, claude-opus-5-5, high effort
🤖 Generated with Claude Code
(Written by Claude Opus 5.5 with high)
Review
Rewritten by
quest reviewafter each round.Head: 5e58140
Base: origin/main at ed1d0b0
Risk: low,
The change touches only quest plan and README documentation and the interop test client `test/interop/clients/js/media.ts`, so nothing a consumer, relay, or published package relies on can break, and a revert fully undoes it.Classified: low by Claude Code, claude-haiku-5-5, low effort, session
68a8fda8-82e0-49dc-b446-e3a37e488b08Reviewer: Codex, gpt-6.1-sol, high effort
Session:
01a20a6d-7873-7f11-9238-6742163efce9, round 1Score: 9/10,
The altered contracts remain consistent with callers, state producers, and lifecycle cases, with no actionable defects found; builds and tests were not run as instructed.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none