Skip to content

CLI: fingerprint snapshots on every core, and --verbose timings (sc-8999) - #109

Merged
ndbroadbent merged 2 commits into
mainfrom
cli-parallel-fingerprint
Dec 3, 2026
Merged

ndbroadbent merged 2 commits into
mainfrom
cli-parallel-fingerprint

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

visualci upload decoded every PNG one at a time to fingerprint it (image_hash::fingerprint_bytes): 68 s for 144 unchanged screenshots on our CI.

  • client::registrations decodes and fingerprints a batch across the machine's cores (std::thread::scope over chunks, no new dependency). Results keep the snapshots' order, and an unreadable file gives the same error as before (the first one in order). add_snapshots uses it per 500-snapshot batch, so memory use is unchanged.
  • The large-suite group check (send_snapshots, 500+ snapshots) hashes in parallel the same way.
  • --verbose (global) prints how long hashing, each API call and the uploads take. Documented in the CLI reference.
  • Test: parallel_registrations_match_the_sequential_ones builds 40 distinct PNGs plus text and inline snapshots, checks the parallel results equal the sequential registration calls exactly, and checks the error names the first missing file.
  • CLI 0.2.18.

Part 2 (the server telling the CLI which sha256s it already has, so unchanged files skip decoding) needs app/ and waits until after the cutover.

Also removes a doc comment on login that was repeated three times on one line.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@ndbroadbent

Copy link
Copy Markdown
Member Author

Closing without merging: the CLI won't decode images at all. It will hash files and the server will fingerprint them, after the cutover (sc-8999). No 0.2.18 release.

@ndbroadbent ndbroadbent closed this Dec 3, 2026
@ndbroadbent
ndbroadbent deleted the cli-parallel-fingerprint branch December 3, 2026 03:32
@ndbroadbent
ndbroadbent restored the cli-parallel-fingerprint branch December 3, 2026 03:33
@ndbroadbent ndbroadbent reopened this Dec 3, 2026
@ndbroadbent

Copy link
Copy Markdown
Member Author

Reopened: we're keeping this after all, since it's already built. The server-side fingerprinting is still planned for after the cutover (sc-8999).

…mings (sc-8999)

visualci upload decoded each PNG one at a time to fingerprint it: 68 s for 144 unchanged screenshots on our CI.
client::registrations now fingerprints a batch across the machine's cores (std::thread::scope over chunks), in
order, with the first failing file's error as before; the large-suite group check does the same. --verbose prints
the time for hashing, each API call and the uploads. CLI 0.2.18.
@ndbroadbent
ndbroadbent force-pushed the cli-parallel-fingerprint branch from 0a88a86 to 81aad91 Compare December 3, 2026 04:00
@ndbroadbent
ndbroadbent merged commit 8e7438b into main Dec 3, 2026
12 checks passed
@ndbroadbent
ndbroadbent deleted the cli-parallel-fingerprint branch December 3, 2026 04:13
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