Skip to content

CLI: send images by SHA-256 alone and stop decoding them (sc-8999); CLI 0.2.20 - #129

Merged
ndbroadbent merged 3 commits into
mainfrom
cli-sha256-snapshots
Dec 3, 2026
Merged

ndbroadbent merged 3 commits into
mainfrom
cli-sha256-snapshots

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 3, 2026 •

Copy link
Copy Markdown
Member

CLI half of sc-8999. Depends on #127 being merged and live in production (kept as a draft until then): today's production server requires fingerprint, and this PR's CI visual job uploads to production with the CLI it builds.

What changes

  • client::classify no longer decodes images: an image's registration has sha256 and no fingerprint. The server answers known or unknown per file and fingerprints new files (app/: snapshots by SHA-256 with the fingerprint optional; the server fingerprints new files; registration in a few queries (sc-8999) #127).
  • PDFs keep sending the CLI's fingerprint (decided: images go by hash only and the server fingerprints them; PDFs keep theirs). A PDF's bytes change every run (CreationDate, /ID) while the drawing doesn't, so without it every PDF would be uploaded every run. Parsing a PDF isn't pixel decoding. Texts keep theirs (their SHA-256, already computed).
  • Large suites: entry_of uses the file's SHA-256 for an image's manifest entry, and check_groups sends image_hash: "sha256", which app/: snapshots by SHA-256 with the fingerprint optional; the server fingerprints new files; registration in a few queries (sc-8999) #127 understands. So the group path doesn't decode either.
  • visualci fingerprint <file> still decodes; that's its job.
  • Behaviour change: an undecodable image used to fail visualci upload locally ("decoding X"); now the server fails that snapshot ("the image couldn't be read").
  • Version 0.2.20 (CLI 0.2.19: snapshot uploads the store refuses are tried again #128 took 0.2.19): Cargo.toml, Cargo.lock's visualci-* and visualci_server entries, app/Cargo.lock's visualci-core.
  • Docs: reference/cli.md (what upload sends), screenshots.md and pdfs.md say images go by hash and VisualCI fingerprints them, and why PDFs keep the CLI's fingerprint. pdfs.md is a skill page: skills/ regenerated, plugin 0.1.48. design.md and reference/api.md say the same (images by hash, Nathan's decision; PDFs keep the CLI's fingerprint, and why). The docs' VISUALCI_VERSION= lines move in a later commit, after the release is out.

Tests

On agents-build-2: cargo fmt --all --check, cargo clippy --locked -p visualci-cli --all-targets -- -D warnings, cargo test --locked -p visualci-cli, skills.mjs --check, (33 passed after rebasing onto #128; the registration test now checks images carry no fingerprint and texts do), and cargo metadata --locked in app/ is clean.

Shortcut: sc-8999

@ndbroadbent ndbroadbent changed the title CLI: send images by SHA-256 alone and stop decoding them (sc-8999); CLI 0.2.19 CLI: send images by SHA-256 alone and stop decoding them (sc-8999); CLI 0.2.20 Dec 3, 2026
@visualci-com

visualci-com Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

VisualCI

docspring/visualci · build #112 · 333 unchanged · no changes

This PR vs base: 4 changed since #71, across 5 builds

docspring/visualci · journeys · build #110 · 12 unchanged · no changes

This PR vs base: 2 changed since #80, across 4 builds

Updated as builds change. Agents can review with VisualCI's MCP tools.

@ndbroadbent
ndbroadbent marked this pull request as ready for review December 3, 2026 11:26
…LI 0.2.19

Images go to POST /snapshots with sha256 and no fingerprint; the server fingerprints files it doesn't have. The group check hashes image entries by file SHA-256 and sends image_hash: sha256. PDFs keep their fingerprint, since their bytes change every run while the drawing doesn't. Needs #127 live in production first.
…the CLI's fingerprint; plugin 0.1.48

cli.md and screenshots.md say the CLI sends images by their SHA-256 and VisualCI fingerprints them; pdfs.md (and its skill) says why PDFs keep their fingerprint: their bytes change every run while what they draw doesn't.
@ndbroadbent
ndbroadbent merged commit 2366787 into main Dec 3, 2026
14 checks passed
@ndbroadbent ndbroadbent mentioned this pull request Dec 3, 2026
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