Add persistent payload verification and improve box handling - #5
Merged
Conversation
Deflating weights is loss on both sides: measured on incompressible bytes, level 6 runs at 47 MB/s and produces an archive 0.03% larger than its input, while level 1 recovers 4 MB/s because the search fails either way. Lowering the level is not the fix; not compressing is. Declared assets are stored automatically, and the new optional uncompressedPaths names anything else the project knows to be compressed already, matching a path and everything beneath it. Nothing opens the file or reads its extension, so the decision comes from the scroll alone and a rebuild of the same commit stays byte-identical. run's two status lines move to stderr. Every other verb owns its standard output; run hands stdout to the box, so a caller redirecting it into a file was receiving a Scrollcase line mixed into the application's bytes, with no way for the box to tell. The second line says the extraction is temporary, on every run rather than above a size threshold, because a caller who does not know that reads a repeated multi-gigabyte extraction as the tool being slow.
Deploying scrollcase with
|
| Latest commit: |
444bc30
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://56354582.scrollcase.pages.dev |
| Branch Preview URL: | https://store-weights-and-run-stderr.scrollcase.pages.dev |
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.
Summary
payload-digest.v1list and an optional signedpayloadDigestrelease fieldscrollcase verify --extractedscrollcase runprogram output to stderrWhy
Consumers need to retain an extracted box across process restarts without trusting caller-created state, and they need an explicit way to prove that the installed payload still matches the signed release. The payload list keeps that verification deterministic and bounded while attachment remains a cheaper structural operation.
The accompanying archive and CLI changes avoid recompressing known compressed assets and keep command output separate from the JSON result emitted by
scrollcase run.Impact
New releases may carry the additive
payloadDigestfield while remaining Scrollcase schema v2. Node and Python expose matching attachment and verification semantics. Existing releases without the field remain preparable and runnable, but cannot use extracted-payload verification.The documented limits are intentional: verification is point-in-time, ignores extra paths plus modes and mtimes, and does not cover generated
__pycache__or*.pycfiles absent from the signed list.Validation
npm test— 343 tests passed across 27 filesnpm run types:checkcd docs && npm run buildpython -m unittest discover -s tests -t .— 49 tests passedmypy srcpython scripts/sync_schemas.py --checkpython -m buildpython scripts/check_distribution.py dist/*./consumer, then restored and proved green with 12/12 focused tests