motion: raise the rule time budget from 5 to 30 seconds (fixes #76) - #78
Merged
Conversation
) The budget must cover a full-page screenshot (itself allowed 4 seconds in procs/shoot.js), decoding two full-page PNGs, and a pixelmatch comparison. With 5 seconds, the rule timed out whenever an initial image existed; in a production fleet, 4 of 4 image-bearing scans were prevented by timeout and the rule never completed a comparison. Verified with a full job on a 150-section local page (chromium, 1280x800, imageColor 2, rules ['y', 'motion']): the rule now completes in 7 seconds with a correct no-motion verdict - over the old budget on even this moderate page, comfortably within the new one. 30 matches the existing budget of the allCaps rule. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remedy 1 from #76: raises the
motionrule'stimeOutfrom 5 to 30 seconds (matching the existingallCapsbudget), with a comment recording why the budget needs the room.Verification
Full job on a 150-section local page (chromium, 1280×800,
imageColor: 2,rules: ['y', 'motion']):totals: [0,0,0,0], no instances) — to my knowledge the first completed motion comparison our fleet or local testing has produced.One further observation for #76's longer-term remedies
While testing on a very tall gradient-heavy page (400 sections), the failure moved upstream: the catalog's own page image failed at
shoot()'s internalpage.screenshot4-second allowance ("Screenshot failed: Timeout 4000ms exceeded"), soimages[0]never existed and motion was prevented with "Initial image missing". So the 4-second screenshot allowance bounds not just motion's shot but the existence of the baseline itself on tall pages — worth folding into any follow-up on #76's remedy 2.🤖 Generated with Claude Code