Skip to content

Fix/repair timeout wpt tests - #1248

Open
mdydek wants to merge 11 commits into
fix/unpin-wpt-windowsfrom
fix/repair-timeout-wpt-tests
Open

Fix/repair timeout wpt tests#1248
mdydek wants to merge 11 commits into
fix/unpin-wpt-windowsfrom
fix/repair-timeout-wpt-tests

Conversation

@mdydek

@mdydek mdydek commented Aug 21, 2026

Copy link
Copy Markdown
Member

Closes #

⚠️ Breaking changes ⚠️

Introduced changes

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added/Conducted relevant tests
  • Performed self-review of the code
  • Updated Web Audio API coverage
  • Added support for web
  • Updated old arch android spec file

mdydek and others added 9 commits August 20, 2026 19:07
… overflow, onended)

Three root causes, measured on a full smoke run (2631/670 in 161s -> 2682/644
in 31s, no per-file regressions, all 13 harness-timeout files gone):

1. AudioParam automation boundaries landed one frame late. The a-rate loop
   accumulated `time += 1/sampleRate` (ULP drift per quantum) and event times
   were compared raw. Events now carry both frame-snapped times
   (round(T*sampleRate), driving ordering and effect boundaries per the WPT
   reference) and raw times (feeding interpolation, which the spec defines on
   real times — audioparam-close.html schedules ramps inside a single frame);
   a due event supersedes an unfinished ramp, and per-sample times are derived
   as (quantumStartFrame + i) / sampleRate. dsp::timeToSampleFrame now rounds
   half-up like Blink instead of truncating.

2. The 100-event WPT automation suites overflowed the 64-slot param event
   queues; BoundedPriorityQueue::push silently drops when full, freezing
   automation at event ~62. AUDIO_PARAM_MAX_QUEUED_EVENTS raised to 256 and
   the memory-pressure estimate updated to model the queues.

3. WPT sets the spec-lowercase `src.onended` and uses
   addEventListener('ended'); the TS layer only had camelCase onEnded, so the
   assignments were dead expandos and four files waited forever. Added the
   spec-name alias, EventTarget-style add/removeEventListener sharing one
   native subscription, and a dispatched event shaped {type: 'ended', target}.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lmw8EDPFNAUqozoD4ho11o
… overflow, onended)

Three root causes, measured on a full smoke run (2631/670 in 161s -> 2682/644
in 31s, no per-file regressions, all 13 harness-timeout files gone):

1. AudioParam automation boundaries landed one frame late. The a-rate loop
   accumulated `time += 1/sampleRate` (ULP drift per quantum) and event times
   were compared raw. Events now carry both frame-snapped times
   (round(T*sampleRate), driving ordering and effect boundaries per the WPT
   reference) and raw times (feeding interpolation, which the spec defines on
   real times — audioparam-close.html schedules ramps inside a single frame);
   a due event supersedes an unfinished ramp, and per-sample times are derived
   as (quantumStartFrame + i) / sampleRate. dsp::timeToSampleFrame now rounds
   half-up like Blink instead of truncating.

2. The 100-event WPT automation suites overflowed the 64-slot param event
   queues; BoundedPriorityQueue::push silently drops when full, freezing
   automation at event ~62. AUDIO_PARAM_MAX_QUEUED_EVENTS raised to 256 and
   the memory-pressure estimate updated to model the queues.

3. WPT sets the spec-lowercase `src.onended` and uses
   addEventListener('ended'); the TS layer only had camelCase onEnded, so the
   assignments were dead expandos and four files waited forever. Added the
   spec-name alias, EventTarget-style add/removeEventListener sharing one
   native subscription, and a dispatched event shaped {type: 'ended', target}.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lmw8EDPFNAUqozoD4ho11o
@github-actions

github-actions Bot commented Aug 21, 2026

Copy link
Copy Markdown

WPT non-regression comparison

PASS — no regressions · 3 improved section(s) · overall 2642 → 2684 (+42)

Spec section Base pass Head pass Delta
AudioBufferSourceNode 208 218 +10
AudioParam 599 629 +30
ConstantSourceNode 62 64 +2
Unchanged sections (25)
Spec section Base pass Head pass Delta
Processing model 0 0 0
Other 52 52 0
AnalyserNode 138 138 0
AudioBuffer 140 140 0
AudioContext 58 58 0
AudioNode 261 261 0
BiquadFilterNode 275 275 0
ChannelMergerNode 30 30 0
ChannelSplitterNode 7 7 0
ConvolverNode 170 170 0
DelayNode 104 104 0
DestinationNode 0 0 0
DynamicsCompressorNode 4 4 0
GainNode 15 15 0
IIRFilterNode 87 87 0
MediaElementAudioSourceNode 0 0 0
MediaStreamAudioDestinationNode 1 1 0
MediaStreamAudioSourceNode 0 0 0
OfflineAudioContext 35 35 0
OscillatorNode 104 104 0
PannerNode 75 75 0
PeriodicWave 33 33 0
ScriptProcessorNode 0 0 0
StereoPannerNode 102 102 0
WaveShaperNode 82 82 0

Baseline: d2ea1b22c2b0ee188564bf77d4256f76fd051320 · Candidate: e196cf0e432171e94f2049ff43094661d0989603

Workflow run · this comment is updated on every push.

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