Skip to content

perf(upload): skip the second validation of a capture web folder, store PNGs in the zip - #121

Merged
epinnock merged 3 commits into
mainfrom
perf/upload-skip-revalidate-store-png
Nov 15, 2026
Merged

epinnock merged 3 commits into
mainfrom
perf/upload-skip-revalidate-store-png

Conversation

@epinnock

Copy link
Copy Markdown
Collaborator

What

  • capture web writes <dir>.scry-validated.json (outside the bundle) after its validation passes: sorted file list with size and mtime, sha256 of scf.json, deployer version, vendored validator version.
  • upload DIR recomputes that fingerprint (stat walk + one file read, ~60 ms on 1,728 stories) and skips its validation only on an exact match AND when staging left scf.json byte-identical. No record, any change, another deployer/validator version, a .zip input or --include-source runs the full validation. New --validate forces it. The log says which path ran.
  • Zip: PNG members stored (method 0), JSON deflated. The service reads method 0 (scry-build-processing-service/src/pipeline/zip-safety.ts inflateStoredEntry, and its archiver-compat test covers STORED).

Measured (E6, full1728 real capture, 3,457 files, this box)

before after
upload DIR --dry-run 17.1 s 5.3 to 5.7 s (skip); 7.6 s with --validate
validate alone 1.9 s
zip 12.6 s, 85.09 MB 3.9 s, 92.84 MB (+9%)

Note: the zip is 7.7 MB larger. At the roughly 1 MB/s uplink in the report that costs about 7 s of PUT, about what the zip saves. The gain from the zip part depends on the runner's uplink.

Release: no behaviour change

🤖 Generated with Claude Code

…re PNGs in the zip

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@epinnock
epinnock marked this pull request as ready for review November 15, 2026 15:22
epinnock and others added 2 commits November 15, 2026 15:23
…config, tests

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@epinnock
epinnock merged commit ae18ed0 into main Nov 15, 2026
3 checks passed
@epinnock epinnock mentioned this pull request Nov 15, 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