From 581d165bdafdd85738ee86578c86830ad2a0f765 Mon Sep 17 00:00:00 2001 From: Codex Date: Wed, 9 Sep 2026 14:53:45 +0300 Subject: [PATCH] test: keep smoke_preloader's reduced-motion wait alive without animation frames MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Validate 34346813552 on the beta.9 candidate failed only in browser smoke shard 1: smoke_preloader phase 3 died with "Resulting promise was garbage collected" — its rAF-only wait for the boot house had no other reference while the runner withheld animation frames. A timer now bounds the wait and keeps the promise reachable; the verdict is unchanged (animationName of the house, or 'missed'). Pre-release gate repair per PROCESS §11.4: locally `node demo/smoke_preloader.mjs` → OK ×2; all other heavy gates of that run (golden, perf-smoke, backend, shards 2–3) were green. Issue: #506 User-Visible: no Release: v1.73.0-beta.9 --- demo/smoke_preloader.mjs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/demo/smoke_preloader.mjs b/demo/smoke_preloader.mjs index 3d649fd9..787abd8c 100644 --- a/demo/smoke_preloader.mjs +++ b/demo/smoke_preloader.mjs @@ -130,11 +130,17 @@ const reduced = await page.evaluate(async () => { const t0 = performance.now(); let anim = 'missed'; await new Promise((done) => { + // A timer keeps this promise reachable even if the renderer withholds + // animation frames for a while (a CI runner under load once let the + // rAF-only chain be garbage-collected mid-wait); the verdict stays the + // same: the house is found, or `anim` remains 'missed'. + const settle = () => { clearTimeout(guard); done(); }; + const guard = setTimeout(settle, 700); const tick = () => { const house = sr().querySelector('.bootveil .boothouse'); - if (house) { anim = getComputedStyle(house).animationName; done(); return; } + if (house) { anim = getComputedStyle(house).animationName; settle(); return; } if (performance.now() - t0 < 500) requestAnimationFrame(tick); - else done(); + else settle(); }; requestAnimationFrame(tick); });