Adjust fixtures for cross platform tolerances - #992
Merged
Merged
Conversation
Tolerances were tuned by hand against one environment and had drifted out of sync with the browsers CI actually runs, causing intermittent failures as Chrome and Firefox updated. Every fixture was measured with tolerance forced to 0 in four environments: macOS Chrome/Firefox, and Linux Chrome/Firefox in a container reproducing the CI image. The container was validated against three known CI pixel counts (crossShadow 1565px, starShadow 1476px, contentMultiline 919px), all reproduced exactly. Tolerances are then derived, not guessed: - delta 0 in all four environments -> tolerance 0 (73 fixtures) - otherwise -> max(1.5 * linux, 1.05 * macOS) (153 fixtures) Linux gets a real margin because CI is the gate; macOS gets just enough to keep local runs green. Net effect is a stricter suite: total allowed differing pixels drop 35% (247975 -> 159947), with 175 fixtures tighter than before and 51 looser where the old value did not actually cover the measured rendering. Verified green in all four environments: macOS 1048 specs, Linux Firefox 524, Linux Chrome 524. Note: macOS margin is 1.05x, so a macOS browser update will redden local runs without affecting CI; re-measuring is cheap. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
kurkle
force-pushed
the
chore/fixtures
branch
from
September 18, 2026 08:39
f5765bf to
463a219
Compare
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.
Fixture tolerances were hand-tuned against a single environment and had drifted out of sync with the browsers CI actually runs. As Chrome and Firefox updated, fixtures started failing one at a time — each fix was calibrated from the failure report, which meant guessing at a margin rather than measuring one.
Measurement
Every fixture was measured with
toleranceforced to 0 in four environments:The container was validated against three pixel counts observed in CI, all reproduced exactly:
point/crossShadowpoint/starShadowdoughnutLabel/contentMultilineNative arm64 was tried first and rejected: it differs from x86_64 (
starShadow1474px vs 1476px,line/labelShadowColors111px vs 193px), so the numbers would not have been CI-faithful.Rule
0max(1.5 × linux, 1.05 × macOS)Linux gets a real margin because CI is the gate. macOS gets just enough to keep local runs green — it renders text 3-4x further from the reference than Linux does, so sizing everything for macOS is what made the old values loose.
Effect
The suite gets stricter, not looser: total allowed differing pixels drop 35% (247,975 → 159,947). 175 fixtures are tighter than before; 51 are looser, in each case because the old value did not actually cover the measured rendering.
Verified green by real runs in all four environments: macOS 1048 specs, Linux Firefox 524, Linux Chrome 524.
Known trade-offs
🤖 Generated with Claude Code