test(engine): the blur trail mask covers the shutter's sweep, not only whole frames (#7624)

A mover that moves further than its own width between frames leaves gaps in a
trail built from whole-frame blur-off poses; the shutter's smear lands in them and
read as a leak outside the trail (nightly seed 63098). The mask now adds the
shutter's sub-frame poses, captured in time order. Seed 63098 joins the default
seeds as the regression case.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Vance Ingalls
2026-11-12 22:51:07 +00:00
committed by GitHub
co-authored by Claude Opus 5.5
parent e09fe6e505
commit 2df837be9e
2 changed files with 19 additions and 4 deletions
@@ -76,17 +76,32 @@ export interface Measured {
mask: Uint8Array;
}
async function wholeFramesAndShutterSweep(
page: Page,
t: number,
): Promise<{ wholeFrames: Rgba[]; sweep: Rgba[] }> {
const whole = neighbourTimes(t);
const times = [...whole, ...shutterTimes(t)].sort((a, b) => a - b);
const wholeFrames: Rgba[] = [];
const sweep: Rgba[] = [];
for (const time of times) {
if (whole.includes(time)) wholeFrames.push(await captureFrame(page, time));
else sweep.push(await captureFrame(page, time, { subFrameDivisions: SUB_FRAME_DIVISIONS }));
}
return { wholeFrames, sweep };
}
export async function measureOutside(
browser: Browser,
f: BlurFixture,
t: number,
tier?: Tier,
): Promise<Measured> {
const offFrames = await captureInOrder(await referencePage(f), neighbourTimes(t));
const { wholeFrames, sweep } = await wholeFramesAndShutterSweep(await referencePage(f), t);
const onFrame = await onFreshPage(browser, f, "on", (p) => captureFrame(p, t), tier);
const reference = offFrames[INVARIANTS.radiusFrames];
const reference = wholeFrames[INVARIANTS.radiusFrames];
if (!reference) throw new Error("missing reference frame");
const mask = trailMask(offFrames, radiusPx(f));
const mask = trailMask([...wholeFrames, ...sweep], radiusPx(f));
const d = compareTiles(reference, onFrame, mask, "outside", {
block: INVARIANTS.block,
maxMae: INVARIANTS.outsideMaxMae,
@@ -21,7 +21,7 @@ import {
} from "./__fixtures__/motionBlur/generate.js";
import { INVARIANTS } from "./__fixtures__/motionBlur/thresholds.js";
const SEEDS = parseSeeds(process.env.HF_BLUR_SEEDS ?? "1,2,3");
const SEEDS = parseSeeds(process.env.HF_BLUR_SEEDS ?? "1,2,3,63098");
const FAILURES_FILE = process.env.HF_BLUR_FAILURES_FILE;
const REQUIRED = process.env.HF_BLUR_REQUIRED === "1";