fix: remove a stale .diff.png once the comparison no longer fails - #416
Merged
Merged
Conversation
A `.diff.png` written by an earlier failed run stayed on disk when the next run passed, created or updated the baseline for the same screenshot. It kept showing up in the screenshots folder (and in anything that lists diff images) although there was nothing left to review. Delete the sibling `.diff.png` whenever the comparison ends without an error. The derivation is skipped when the path carries no `.actual` suffix, so hand-picked `matchAgainstPath` files are never touched. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
FRSgit
added this pull request to stack #419
September 21, 2026 23:49
FRSgit
removed this pull request from stack #419
September 21, 2026 23:52
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.
When a run failed and wrote
foo_#0.diff.png, that file stayed around forever once the next run passed (or created/updated the baseline). Nothing was left to review, but the diff kept showing up in the screenshots folder and in anything that lists diff images.Now the sibling
.diff.pnggets deleted whenever a comparison ends without an error. The path derivation bails out when the name has no.actualsuffix, so a hand-pickedmatchAgainstPathfile can't be touched by accident.The upcoming run manifest (#414) reports
images.diff.pathbased on what's on disk, so it needs this to be able to promisenullfor passed entries.馃 Generated with Claude Code