From 7773edb32e21530df6f7e5c77a966d5faf24ad08 Mon Sep 17 00:00:00 2001 From: maurild14 <170974718+maurild14@users.noreply.github.com> Date: Thu, 12 Nov 2026 16:16:51 -0300 Subject: [PATCH] test(engine): mask the shutter's sweep in the blur outside check A mover that jumps further than the mask dilation between two whole frames was never sampled in the gap, so the blur trail it correctly leaves there read as an outside-the-trail defect (seed 63098). Build the outside mask from the blur-off shutter samples at t as well. Fixes #7596 Co-Authored-By: Claude Opus 5.5 --- .../__fixtures__/motionBlur/differentialPage.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/engine/src/services/__fixtures__/motionBlur/differentialPage.ts b/packages/engine/src/services/__fixtures__/motionBlur/differentialPage.ts index 7f4bcd7a31d..4084edee15e 100644 --- a/packages/engine/src/services/__fixtures__/motionBlur/differentialPage.ts +++ b/packages/engine/src/services/__fixtures__/motionBlur/differentialPage.ts @@ -82,11 +82,17 @@ export async function measureOutside( t: number, tier?: Tier, ): Promise { - const offFrames = await captureInOrder(await referencePage(f), neighbourTimes(t)); + const page = await referencePage(f); + const offFrames = await captureInOrder(page, neighbourTimes(t)); + // A mover that jumps more than the dilation between two whole frames is never sampled in the gap, + // but the shutter sweeps it: mask what the shutter sees too, or its blur reads as a defect. + const shutter = await captureInOrder(page, shutterTimes(t), { + subFrameDivisions: SUB_FRAME_DIVISIONS, + }); const onFrame = await onFreshPage(browser, f, "on", (p) => captureFrame(p, t), tier); const reference = offFrames[INVARIANTS.radiusFrames]; if (!reference) throw new Error("missing reference frame"); - const mask = trailMask(offFrames, radiusPx(f)); + const mask = trailMask([...offFrames, ...shutter], radiusPx(f)); const d = compareTiles(reference, onFrame, mask, "outside", { block: INVARIANTS.block, maxMae: INVARIANTS.outsideMaxMae,