Android screenshot goldens are order-sensitive: inserting a case moves its neighbour #235
Labels
No labels
adr
android
area/calendar
area/design-system
area/i18n
area/jobs
area/offline
area/server
area/testing
bug
ci
duplicate
enhancement
help wanted
invalid
notifications
question
reliability
security
severity/low
severity/medium
tracking
web
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
eagraiclainne/app#235
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found while adding one conformance case to
render-job-sheet.json.Adding a case in the middle of the array made an unrelated, untouched golden
fail —
jobsheet-repeat-sheet-hearth-dark.png— with a bounded pixel differenceon the
⋯button of the sheet behind the overlay. Establised by A/B, notassumption:
clean again, and the new case's own freshly-recorded golden diverges instead
So the perturbation follows whichever case is adjacent. It is not the content of
any case.
Why
ScreenshotTest.shootHearthhosts every case from one fixture inside a singlepersistent
compose.setContent, flipping acurrentindex and callingcaptureRoboImageper shot. The subtree is wrapped inkey(name), which shouldtear down and rebuild it — but in practice a few dozen sub-pixels of the next
shot's stroke rendering depend on what was hosted before it.
The web equivalent has no such coupling:
screens.spec.tsdoes a fullpage.goto()per case, and the same reordering showed zero effect there.Why it matters
The current workaround is a convention: append new cases, never insert. That
works and is what the make-it-part-of-another-job case does, but it is invisible,
unenforced, and one careless insertion away from a failure that looks like
machine drift — which is exactly how it was first misdiagnosed.
Worth fixing properly: give each shot its own
setContent(or its own testmethod) so a case's rendering cannot depend on its neighbour. Until then the
convention should be written into
conformance/README.mdand AGENTS.md's goldenssection, because a future author will hit this and reasonably conclude the
machine is at fault.
The trap that hid it
verifyRoborazziDebugwithout--rerun-taskscan return a cached BUILDSUCCESSFUL that ran no tests at all — a passing result for a state that fails.
Any golden verification that matters needs
--rerun-tasks.