Skip to content

fix(storage): add retained manifest import gates - #606

Draft
fishmingyu wants to merge 3 commits into
feat/strict-context-publication-v2from
feat/retained-manifest-prerequisites-v2
Draft

fix(storage): add retained manifest import gates#606
fishmingyu wants to merge 3 commits into
feat/strict-context-publication-v2from
feat/retained-manifest-prerequisites-v2

Conversation

@fishmingyu

Copy link
Copy Markdown
Member

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

  • Add an additive ReceiptVerifyingObjectStore capability and exact LocalCAS.verify_receipt validation without changing the existing ObjectStore runtime contract.
  • Reject forged receipt and scalar subclasses before backend access while documenting the point-in-time, non-pinning lifetime.
  • Expose a conservative physical view-bundle size gate for coordinators to run before object-store byte access.
  • Include namespace and repository identity closure in SQLite snapshot summaries and verify complete snapshot identity reconstruction.
  • Record the completed gates and the still-deferred non-forgeable retained bundle owner, manifest planner, CAS upload, and ref publication work.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Refactoring
  • Performance improvement
  • Tests

Testing

  • Tests pass locally
  • Added new tests for the changes

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 --check all pass for the changed surface.

Checklist

  • My code follows the project style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Stacked on #605. Keep this PR in Draft until that dependency is merged or the stack is explicitly restacked and reverified.

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.
@github-actions github-actions Bot added type/docs Documentation type/test Test-related labels Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/docs Documentation type/test Test-related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant