Skip to content

Find split mode snapshots - #14

Merged
SimonCropp merged 1 commit into
mainfrom
simon/split-mode-snapshots
Sep 20, 2026
Merged

SimonCropp merged 1 commit into
mainfrom
simon/split-mode-snapshots

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

UseUniqueDirectory in split mode names the directory {prefix}.received and the files inside it after their targets, so no file name carries a .received. marker. The scan globs **/*.received.*, so it matched none of them and the tool reported nothing pending for a project using split mode. There was no way to accept such a snapshot.

Verify records the pair for every received file it leaves on disk, split mode included, so the maps already knew about these. They were only ever consulted as a lookup for files the glob had already found, never enumerated. Pairs the glob did not find are now added directly.

Only pairs the glob missed are added, so nothing is reported twice, and the inline staging filter is applied to them as well, so a staged inline snapshot the glob deliberately skipped is not reintroduced by its map.

A map records absolute paths and a test can send its snapshots anywhere, so a map found under the scanned root can name a file outside it. The existing code could never surface one, since it only looked maps up by files already found under the root. Pairs outside the root are dropped, so reviewing a directory still cannot reach out of it.

Without a map a split mode snapshot stays invisible: the name carries nothing to pair on, and inventing a pairing is worse than reporting nothing. Pinned by a test.

Headers name the directory for a split mode snapshot. The file is named after its target, commonly target.txt, so the file name alone does not say which test is under review and every split mode snapshot in a run read the same. Flat snapshots are unchanged.

UseUniqueDirectory in split mode names the directory `{prefix}.received`
and the files inside it after their targets, so no file name carries a
`.received.` marker. The scan globs `**/*.received.*`, so it matched none
of them and the tool reported nothing pending for a project using split
mode. There was no way to accept such a snapshot.

Verify records the pair for every received file it leaves on disk, split
mode included, so the maps already knew about these. They were only ever
consulted as a lookup for files the glob had already found, never
enumerated. Pairs the glob did not find are now added directly.

Only pairs the glob missed are added, so nothing is reported twice, and
the inline staging filter is applied to them as well, so a staged inline
snapshot the glob deliberately skipped is not reintroduced by its map.

A map records absolute paths and a test can send its snapshots anywhere,
so a map found under the scanned root can name a file outside it. The
existing code could never surface one, since it only looked maps up by
files already found under the root. Pairs outside the root are dropped,
so reviewing a directory still cannot reach out of it.

Without a map a split mode snapshot stays invisible: the name carries
nothing to pair on, and inventing a pairing is worse than reporting
nothing. Pinned by a test.

Headers name the directory for a split mode snapshot. The file is named
after its target, commonly `target.txt`, so the file name alone does not
say which test is under review and every split mode snapshot in a run
read the same. Flat snapshots are unchanged.
@SimonCropp SimonCropp added this to the 0.10.0 milestone Sep 20, 2026
@SimonCropp
SimonCropp merged commit e780c5a into main Sep 20, 2026
2 checks passed
@SimonCropp
SimonCropp deleted the simon/split-mode-snapshots branch September 20, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant