test(e2e): deflake spectrum console-hygiene check against random-track engine noise#56
Merged
Merged
Conversation
…ne check The spectrum-analyzer verify spec loads a non-deterministic random track, whose format may not be decodable by whichever engine play() dispatches to. That logs benign engine errors — `[pcm] 4` (MEDIA_ERR_SRC_NOT_SUPPORTED) or an `[ahx-processor]` wasm-init failure — which intermittently tripped the console-hygiene assertion and failed CI for changes unrelated to the audio engines (e.g. Dependabot Action bumps). Filter these the same way as benign resource 404s: they originate from the audio engines reacting to an unlucky track pick, not from the spectrum analyzer under test. Assisted-by: ClaudeCode:claude-opus-4-8
The layout assertion required canvas.x to clear the disc's right edge with only 1px of slack. The disc gif's intrinsic width plus CI-side flex-row settling can drift the disc's measured right edge a few px past canvas.x (observed ~5px on chromium), flaking the check on changes unrelated to layout. Widen the slack to 8px, mirroring the generous vertical-center tolerance documented just below it. The intent is "disc on the left, canvas on the right", not pixel-perfect non-overlap; a genuine misplacement still fails by tens of px. Assisted-by: ClaudeCode:claude-opus-4-8
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.
What
Extends the console-error allow-filter in
e2e/spectrum-analyzer.verify.spec.tsto ignore benign, non-deterministic audio-engine errors from the random track the spec loads.Why
The spec dismisses the splash via
.randombtn, which picks an arbitrary track. Depending on that pick,play()dispatches to an engine that can't decode it, logging:[pcm] 4—MEDIA_ERR_SRC_NOT_SUPPORTEDfrom the PCM<audio>element (lib/audio-player.ts:380)[ahx-processor] init failed/wasm_init failed— AHX worklet init (public/ahx.worklet.js)The test's step 11 console-hygiene assertion (
expect(consoleErrors).toEqual([])) then fails — but these errors come from the audio engines reacting to an unlucky track pick, not from the spectrum analyzer under test. This flaked CI on changes that touch neither (e.g. the recent Dependabot Action bumps #51/#53, which both needed playwright re-runs).Change
One new regex (
ENGINE_NOISE_RE = /^\[(pcm|ahx-processor)\]/), applied exactly like the existingRESOURCE_404_RE404 filter. The assertion still fails loudly on any otherconsole.errororpageerror— including any genuine fault in the spectrum analyzer itself.🤖 Generated with Claude Code