Repository navigation
Retry a screenshot Chromium refuses for a moment, and fix three CI flakes - #44
Merged
Merged
Conversation
…akes Two snapshot tests failed once in CI with "Page.captureScreenshot: Unable to capture screenshot": Chromium refused a capture for a moment on a busy runner, and Whirl reported a runtime error. SNAPSHOT (page, viewport, and element captures), SCREENSHOT, and JUDGE now take such a capture again after a short pause, until the step's time runs out. Any other capture error fails as before. The 60 fps video test failed once on macOS with 61 distinct frames of 128: on a busy runner, with --trace sharing the screencast, Chrome supplies fewer distinct frames and the recorder repeats the last one to keep the rate. The test only needs to show that the animation was recorded, and a still page gives one or two distinct frames, so both rate checks now require a quarter of the frames to differ instead of half. Co-Authored-By: Claude Opus 5.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.
Stacked on #42. Fixes the three tests that each failed once in CI after the #43 fix went up the stack, and passed on re-run.
Two snapshot tests: a real robustness fix
snapshot_count_percent_threshold_and_dimension_boundaries(Ubuntu, #36) anda_snapshot_mismatch_fails_and_writes_actual_and_diff(macOS, #42) both failed with:Chromium refused a capture for a moment on a busy runner, and Whirl reported a runtime error. A user's
SNAPSHOTcould fail in CI the same way, so the fix is in the shim, not the tests:SNAPSHOT(page, viewport, and element captures),SCREENSHOT, andJUDGEnow take such a capture again after a short pause, until the step's time runs out. Any other capture error fails as before. SPEC section 7 says so, and a shim unit test covers the retry, an unrelated error, and an expired deadline. No protocol change.The 60 fps video test: a machine-dependent threshold
chromium_video_records_at_60_fps_by_default_and_at_the_requested_rate(macOS, #35) failed withan animating page should record distinct frames, got 61 of 128. On a busy runner, with--tracesharing the screencast, Chrome supplies fewer distinct frames, and the recorder repeats the last one to keep 60 fps, as designed. The check exists to show that the animation was recorded; a still page gives one or two distinct frames. Both rate checks now require a quarter of the frames to differ instead of half, which still separates animation from a frozen page by a wide margin.Validation:
mise run check; CI below.🤖 Generated with Claude Code