Summary
The motion rule's timeOut: 5 budget cannot cover the work the rule does, so in practice the rule times out whenever it has an initial image to compare against — which means it never produces a verdict at all.
Evidence
Checking our scan fleet's stored reports (all scans that ran the testaro tool):
- 82 scans ran the
testaro tool.
- 78 had no catalog image (no
imageColor), so motion was prevented with "Initial image missing" — expected.
- In the 4 scans that did have a catalog image,
motion was prevented by timeout — all 4 of 4.
- Across the fleet's entire history,
motion has never completed a comparison (zero verdicts, pass or fail).
Why the budget can't fit
The per-rule time limit races only the reporter (tests/testaro.js), so launch/navigation is excluded — that part is fine. But inside the budget, motion must:
- Take a full-page screenshot via
shoot(), whose own internal page.screenshot timeout is applyMultiplier(4000) — 4 of the 5 seconds, scaled by the same multiplier as the rule budget, so the ratio never improves.
- Decode two full-page PNGs with
PNG.sync.read (a full-page shot of a long page is easily 10k+ CSS px tall — tens of megapixels).
- Run
pixelmatch over every pixel.
Steps 2–3 alone routinely exceed the ~1 second that remains after a normal screenshot, and a screenshot that uses most of its 4-second allowance leaves nothing. The arithmetic makes the timeout close to deterministic on real pages; our 4-of-4 is consistent with that.
Suggested remedies (can combine)
- Raise
motion's timeOut to something that fits the work, e.g. 20–30 (there is precedent: another rule already uses timeOut: 30). One-line change; I'm happy to PR it.
- Longer-term: exclude the screenshot from the raced budget (take the shot, then start the timer), or compare on downscaled images / a capped page height to bound decode+compare cost.
Related but independent: #51 / PR #75 keep images[0] CSS-scale so this rule's comparison stays valid under imageScale; nothing there changes the cost profile described here.
Summary
The
motionrule'stimeOut: 5budget cannot cover the work the rule does, so in practice the rule times out whenever it has an initial image to compare against — which means it never produces a verdict at all.Evidence
Checking our scan fleet's stored reports (all scans that ran the
testarotool):testarotool.imageColor), somotionwas prevented with "Initial image missing" — expected.motionwas prevented bytimeout— all 4 of 4.motionhas never completed a comparison (zero verdicts, pass or fail).Why the budget can't fit
The per-rule time limit races only the reporter (
tests/testaro.js), so launch/navigation is excluded — that part is fine. But inside the budget,motionmust:shoot(), whose own internalpage.screenshottimeout isapplyMultiplier(4000)— 4 of the 5 seconds, scaled by the same multiplier as the rule budget, so the ratio never improves.PNG.sync.read(a full-page shot of a long page is easily 10k+ CSS px tall — tens of megapixels).pixelmatchover every pixel.Steps 2–3 alone routinely exceed the ~1 second that remains after a normal screenshot, and a screenshot that uses most of its 4-second allowance leaves nothing. The arithmetic makes the timeout close to deterministic on real pages; our 4-of-4 is consistent with that.
Suggested remedies (can combine)
motion'stimeOutto something that fits the work, e.g. 20–30 (there is precedent: another rule already usestimeOut: 30). One-line change; I'm happy to PR it.Related but independent: #51 / PR #75 keep
images[0]CSS-scale so this rule's comparison stays valid underimageScale; nothing there changes the cost profile described here.