From 3cd6cd6a1c08700aa760307f3a16e1bd2334d6aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel?= Date: Tue, 26 May 2026 23:10:49 -0400 Subject: [PATCH] test(producer): add parallel capture regression test (#1088) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test(producer): add parallel capture regression test Add a regression fixture that forces workers: 2, ensuring the parallel capture code path (browser-per-worker in BeginFrame mode) is exercised in CI. All existing fixtures pin workers: 1, so this is the first test that would catch a regression in the multi-worker pool isolation fix from PR #1087. The composition is 5s @ 30fps (150 frames), which exceeds both MIN_FRAMES_PER_WORKER * 2 (60) and minParallelFrames (120), so the parallel coordinator will always split work across workers. Baseline output/output.mp4 must be generated inside Dockerfile.test before the fixture can run in CI. * test(producer): bump parallel capture test to 4 workers Matches realistic auto-mode worker counts (4-6 on typical machines), not just the minimum (2) that triggers the bug. * test(producer): add golden baseline for parallel capture regression Generated inside Dockerfile.test on amd64 Linux (Docker image hyperframes-producer:test) to match the CI rendering environment. * test(producer): address review feedback on parallel capture test - Add fixture to shard-5 in regression.yml so CI actually runs it - Reframe description: multi-worker path coverage (frame distribution, reorder buffer, per-worker browser lifecycle), not GPU-specific crash guard — SwiftShader CI can't reproduce the hardware compositor race - Remove dead @keyframes count-up (content doesn't apply to div) - Remove unused CSS animation reference on .counter - Regenerate golden baseline with cleaned-up HTML * fix(producer): replace rAF + CSS keyframes with GSAP in parallel-capture test The composition used requestAnimationFrame for a frame counter and CSS @keyframes for animations, which triggered screenshot capture mode (non-deterministic across workers) and caused 29 PSNR failures in CI. All animations now use the GSAP timeline, keeping the render in deterministic BeginFrame mode. Baseline regenerated in Docker. --- .github/workflows/regression.yml | 2 +- .../parallel-capture-regression/meta.json | 13 ++ .../output/compiled.html | 147 ++++++++++++++++++ .../output/output.mp4 | 3 + .../src/index.html | 141 +++++++++++++++++ 5 files changed, 305 insertions(+), 1 deletion(-) create mode 100644 packages/producer/tests/parallel-capture-regression/meta.json create mode 100644 packages/producer/tests/parallel-capture-regression/output/compiled.html create mode 100644 packages/producer/tests/parallel-capture-regression/output/output.mp4 create mode 100644 packages/producer/tests/parallel-capture-regression/src/index.html diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml index dd7b9a412..0f9c1d3d8 100644 --- a/.github/workflows/regression.yml +++ b/.github/workflows/regression.yml @@ -73,7 +73,7 @@ jobs: - shard: shard-4 args: "style-16-prod style-9-prod style-17-prod iframe-render-compat variables-prod mp4-h265-sdr" - shard: shard-5 - args: "style-4-prod style-11-prod style-2-prod animejs-adapter typegpu-adapter" + args: "style-4-prod style-11-prod style-2-prod animejs-adapter typegpu-adapter parallel-capture-regression" - shard: shard-6 args: "overlay-montage-prod style-12-prod chat missing-host-comp-id png-sequence" - shard: shard-7 diff --git a/packages/producer/tests/parallel-capture-regression/meta.json b/packages/producer/tests/parallel-capture-regression/meta.json new file mode 100644 index 000000000..ac8afcae7 --- /dev/null +++ b/packages/producer/tests/parallel-capture-regression/meta.json @@ -0,0 +1,13 @@ +{ + "name": "parallel-capture-regression", + "description": "Multi-worker parallel capture path coverage. Exercises frame distribution, reorder buffer, and per-worker browser lifecycle at workers > 1. Guards against regressions in executeParallelCapture and the streaming encoder's ordered-write path. Note: the GPU-specific BeginFrame compositor race (#1087) only reproduces on hardware-GPU hosts, not in SwiftShader CI.", + "tags": ["regression", "parallel", "render-compat"], + "minPsnr": 30, + "maxFrameFailures": 0, + "minAudioCorrelation": 0, + "maxAudioLagWindows": 1, + "renderConfig": { + "fps": 30, + "workers": 4 + } +} diff --git a/packages/producer/tests/parallel-capture-regression/output/compiled.html b/packages/producer/tests/parallel-capture-regression/output/compiled.html new file mode 100644 index 000000000..06150913f --- /dev/null +++ b/packages/producer/tests/parallel-capture-regression/output/compiled.html @@ -0,0 +1,147 @@ + + + + + + + +
+
+
+
+
Parallel Capture
+
0
+
+
+
+
+
+ + + diff --git a/packages/producer/tests/parallel-capture-regression/output/output.mp4 b/packages/producer/tests/parallel-capture-regression/output/output.mp4 new file mode 100644 index 000000000..1a9f9b7e7 --- /dev/null +++ b/packages/producer/tests/parallel-capture-regression/output/output.mp4 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2b84069be35430d72eced09c9b1e6cfd2c3a750c1a42f4332b99dfa54c516ddf +size 1147085 diff --git a/packages/producer/tests/parallel-capture-regression/src/index.html b/packages/producer/tests/parallel-capture-regression/src/index.html new file mode 100644 index 000000000..4bc225239 --- /dev/null +++ b/packages/producer/tests/parallel-capture-regression/src/index.html @@ -0,0 +1,141 @@ + + + + + + + +
+
+
+
+
Parallel Capture
+
0
+
+
+
+
+
+ + +