test(e2e): serve deterministic MOD fixture in clock-advances spec - #65
Merged
Merged
Conversation
indigo423
force-pushed
the
fix/deflake-clock-advances-deterministic-track
branch
from
June 5, 2026 21:27
3b1db99 to
2ee0f67
Compare
The "audio reaches destination" spec drove the splash "play random
track" path, whose modarchive id is non-deterministic. When the random
pick resolved to a non-libopenmpt format (AHX/PCM routes to a different
engine), an Invalid-ID stub, or an otherwise undecodable file, the
worklet never decoded, the 🎶 document.title was never set, and the spec
timed out at 30s — failing CI on chromium and webkit for reasons
unrelated to the audio path under test.
Intercept api.modarchive.org/downloads.php and fulfill it with a minimal
but audible in-memory ProTracker ("M.K.") module: one looping square-wave
sample retriggered across the pattern. Whatever random id the splash
resolves to now yields the same known-good module, so both "did it
decode" (🎶 title, clock advances) and "is audio flowing" (non-zero
AnalyserNode peak) become deterministic and the external-network
dependency is removed entirely. Mirrors the spectrum spec, which already
sidesteps the real network track fetch.
Runtime drops from a 30s timeout to ~4s per browser.
Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: Ronny Trommer <ronny@no42.org>
indigo423
force-pushed
the
fix/deflake-clock-advances-deterministic-track
branch
from
June 5, 2026 21:29
2ee0f67 to
2c23266
Compare
indigo423
enabled auto-merge (squash)
June 5, 2026 21:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
CI run 27039432295 failed: the
audio reaches destination after user starts playbackspec timed out on chromium and webkit (page.waitForFunction(() => document.title.startsWith("🎶")), 30s).The spec drove the splash "play random track" path, whose modarchive id is non-deterministic. When the random pick resolves to a non‑libopenmpt format (AHX/PCM route to a different engine), an Invalid‑ID stub, or an otherwise undecodable file, the worklet never decodes → the
🎶title is never set → the clock stays at00:00and the spec times out. This is the same random‑track nondeterminism PR #56 had to paper over for the spectrum spec.Fix
Intercept
api.modarchive.org/downloads.phpin the spec and fulfill it with a minimal but audible in‑memory ProTracker (M.K.) module — one looping square‑wave sample retriggered across the pattern. Whatever random id the splash resolves to now yields the same known‑good module, so:🎶title, clock advances) andAnalyserNodepeak)both become deterministic, and the external‑network dependency is removed entirely. This mirrors the spectrum spec, which already "sidesteps the need for a real network track fetch."
Verification
Ran locally on all three browser projects:
Runtime drops from a 30s timeout to ~4s per browser.
npm run typecheckandnpm run lintclean (no new warnings).🤖 Generated with Claude Code