fix(storage): add retained manifest import gates - #606
Draft
fishmingyu wants to merge 3 commits into
Draft
Conversation
Add an optional receipt-verification capability without changing the existing ObjectStore runtime protocol. LocalCAS now revalidates the exact digest, byte size, and canonical storage key while explicitly remaining a point-in-time, non-pinning check. Reject subclass-based equality forgeries before backend access and cover legacy protocol compatibility plus adversarial receipt inputs.
Expose the pre-access physical archive-size gate and include namespace and repository identities in snapshot summaries. These checks let a future retained-manifest coordinator reject oversized objects before backend reads and reconstruct every published identity from one SQLite read transaction. Cover default and custom namespaces, full snapshot identity recomputation, malformed physical receipts, and existing verify/materialize paths.
Record the new receipt, physical-size, and snapshot identity gates while keeping M1 in progress. The roadmap explicitly leaves non-forgeable retained bundle consumption, manifest planning, CAS upload, and ref publication for later layers.
14 tasks
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
Add the backend-neutral receipt, archive-size, and catalog identity gates needed before retained manifests can safely enter the storage control plane. This is a focused prerequisite layer and does not claim manifest import or ref publication is complete.
Changes
ReceiptVerifyingObjectStorecapability and exactLocalCAS.verify_receiptvalidation without changing the existingObjectStoreruntime contract.Type of Change
Testing
pytest -q test/storage --tb=short: 283 passed.Pinned Black 24.8.0, isort 5.13.2, flake8 7.1.1 plus bugbear, py_compile, and
git diff --checkall pass for the changed surface.Checklist
Stacked on #605. Keep this PR in Draft until that dependency is merged or the stack is explicitly restacked and reverified.