- Rename and update test_tiled_screenshot_failure_returns_none_without_fallback
to reflect new behavior: falsy tiled result falls back to standard screenshot
instead of returning None
- Guard the else: cache_payload.error() call in compute_and_cache to only fire
when status is not already ERROR, preserving the original failure timestamp
- Remove stale PT004 ignore (rule removed in ruff 0.9.7)
- Apply ruff 0.9.7 formatting to match CI
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add PT001 to ruff ignore list so local and CI ruff versions don't conflict over
fixture parentheses style. Also fix test_tiled_fallback_triggered_on_empty_bytes
to patch page.screenshot directly instead of the static method, which was
returning a MagicMock in CI.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two bugs that could cause blank PDFs to re-trigger indefinitely:
1. webdriver.py: tiled fallback used `if img is None:` which let b""
(returned by combine_screenshot_tiles on an empty tile list) pass
through silently. Changed to `if not img:` to catch both cases.
2. screenshots.py: compute_and_cache had no else branch after
`if image: cache_payload.update(image)`. When get_screenshot returned
None or b"" without raising, status stayed at COMPUTING instead of
ERROR, causing is_computing_stale() to re-trigger the task
indefinitely after THUMBNAIL_ERROR_CACHE_TTL. Added
`else: cache_payload.error()` so failed screenshots always transition
to ERROR and use the controlled TTL back-off.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>