test: keep smoke_preloader's reduced-motion wait alive without animation frames

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
This commit is contained in:
Codex
2026-09-09 14:53:45 +03:00
parent a9d0cab2dd
commit 581d165bda
+8 -2
View File
@@ -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);
});