fix(storage): add retained manifest import gates - #606
Merged
Conversation
14 tasks
fishmingyu
force-pushed
the
feat/strict-context-publication-v2
branch
from
August 15, 2026 23:50
3e963f0 to
31c628a
Compare
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.
fishmingyu
force-pushed
the
feat/retained-manifest-prerequisites-v2
branch
from
August 16, 2026 00:07
3e3b413 to
92465c9
Compare
fishmingyu
marked this pull request as ready for review
August 16, 2026 00:26
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 92465c9c92
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Require exact built-in integers before comparing physical archive receipts so overloaded integer subclasses cannot bypass the pre-access limit. Verified with 86 view-bundle tests, 311 storage tests, and the changed-file pre-commit hooks.
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
Tests pass locally
Added new tests for the changes
umask 022; pytest -q test/storage --tb=short: 310 passed.Unit tier (excluding only the shared-environment installed-version mismatch): 5559 passed, 71 skipped, 191 deselected.
pre-commit run --from-ref origin/main --to-ref HEAD: passed.python -m mkdocs build --strict: passed.git diff --check origin/main...HEAD: passed.Checklist
#605 is merged and its Docs, Release, and publish-smoke checks are green. This PR is restacked directly on the resulting
main; it does not enable a production importer or claim object retention beyond point-in-time receipt verification.