Skip to content

Add content-addressed Cloudflare canonical restore packs - #2142

Merged
chubes4 merged 1 commit into
mainfrom
perf/2135-canonical-restore-pack
Jul 27, 2026
Merged

Add content-addressed Cloudflare canonical restore packs#2142
chubes4 merged 1 commit into
mainfrom
perf/2135-canonical-restore-pack

Conversation

@chubes4

@chubes4 chubes4 commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

Replace per-file canonical cold hydration with one deterministic, content-addressed restore-pack read while preserving canonical R2 objects as authority.

What changed

  • Persist and strictly validate deterministic restore packs; hydrate pack-backed revisions through one R2 object read while retaining bounded legacy manifest hydration; add fail-closed corruption coverage and restart evidence for Durable Object and D1 coordinators.

How to test

  1. Run npm run test:cloudflare-runtime; expect Cloudflare unit and contract tests plus TypeScript pass.
  2. Run npm run cloudflare:local-gate; expect Durable Object restart proves one restore-pack read and no legacy object hydration.
  3. Run npm run cloudflare:local-gate:d1; expect D1 restart proves one restore-pack read and no legacy object hydration.

Compatibility

Existing manifests without restore-pack metadata continue through bounded authoritative object hydration. Referenced missing, corrupt, or divergent packs fail closed. Canonical Markdown, upload, and wp-content objects remain independently written and authoritative.

Evidence

  • Base unchanged since verification: main remains at bfc6ef7.
  • Reviewer-resolvable evidence from source_refs[0]: Add content-addressed Cloudflare canonical restore packs #2135
  • Verified finalization base: main at bfc6ef7
  • cloudflare-runtime: passed (Full Cloudflare tests and TypeScript passed) (Passed)
  • d1-restart: passed (One-pack restart hydration passed; cold 602ms, warm 4ms) (Passed)
  • durable-object-restart: passed (One-pack restart hydration passed; cold 621ms, warm 4ms) (Passed)

AI assistance

  • AI assistance: Yes
  • Tool(s): Homeboy (OpenCode)
  • Model: openai/gpt-5.6-sol
  • Used for: I inspected the existing Cloudflare persistence and hydration paths, implemented the restore-pack contract, hardened integrity and extraction bounds after reviewing the diff, added behavioral coverage, and interpreted the local restart evidence; a second OpenCode review found no further code changes.

Source relationships

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.

Add content-addressed Cloudflare canonical restore packs

1 participant