Skip to content

Add persistent payload verification and improve box handling - #5

Merged
suffro merged 2 commits into
mainfrom
store-weights-and-run-stderr
Aug 3, 2026
Merged

Add persistent payload verification and improve box handling#5
suffro merged 2 commits into
mainfrom
store-weights-and-run-stderr

Conversation

@suffro

@suffro suffro commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • commit new boxes to their extracted payload with a canonical payload-digest.v1 list and an optional signed payloadDigest release field
  • add restart-safe attachment and explicit extracted-payload verification to the Node and Python consumers, plus scrollcase verify --extracted
  • extend the shared conformance suite, public types, schemas, documentation, and package-surface coverage
  • preserve explicitly declared already-compressed archive paths and route scrollcase run program output to stderr

Why

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 payloadDigest field 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 *.pyc files absent from the signed list.

Validation

  • npm test — 343 tests passed across 27 files
  • npm run types:check
  • cd docs && npm run build
  • python -m unittest discover -s tests -t . — 49 tests passed
  • mypy src
  • python scripts/sync_schemas.py --check
  • python -m build
  • python scripts/check_distribution.py dist/*
  • package-surface guard deliberately proved red without ./consumer, then restored and proved green with 12/12 focused tests

suffro added 2 commits August 3, 2026 05:07
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.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying scrollcase with  Cloudflare Pages  Cloudflare Pages

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

View logs

@suffro
suffro merged commit b48c661 into main Aug 3, 2026
14 checks passed
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