Skip to content

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

Merged
fishmingyu merged 4 commits into
mainfrom
feat/retained-manifest-prerequisites-v2
Aug 16, 2026
Merged

fix(storage): add retained manifest import gates#606
fishmingyu merged 4 commits into
mainfrom
feat/retained-manifest-prerequisites-v2

Conversation

@fishmingyu

@fishmingyu fishmingyu commented Aug 12, 2026

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

  • 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

  • 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

#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.

@github-actions github-actions Bot added type/docs Documentation type/test Test-related labels Aug 12, 2026
@fishmingyu
fishmingyu force-pushed the feat/strict-context-publication-v2 branch from 3e963f0 to 31c628a Compare August 15, 2026 23:50
Base automatically changed from feat/strict-context-publication-v2 to main August 16, 2026 00:03
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
fishmingyu force-pushed the feat/retained-manifest-prerequisites-v2 branch from 3e3b413 to 92465c9 Compare August 16, 2026 00:07
@fishmingyu
fishmingyu marked this pull request as ready for review August 16, 2026 00:26

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread codenib/storage/view_bundle.py
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.
@fishmingyu
fishmingyu merged commit 993f98b into main Aug 16, 2026
22 checks passed
@fishmingyu
fishmingyu deleted the feat/retained-manifest-prerequisites-v2 branch August 16, 2026 00:43
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