Skip to content

feat(cli): seed retained OpenNext cache with bucket-scoped S3 - #6

Closed
WillieCubed wants to merge 2 commits into
mainfrom
codex/r2-s3-cache-transport
Closed

WillieCubed wants to merge 2 commits into
mainfrom
codex/r2-s3-cache-transport

Conversation

@WillieCubed

@WillieCubed WillieCubed commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

TL;DR

Prepare an explicit bucket-scoped S3 transport for retained OpenNext cache seeding and fix Worker recovery capture's handling of Cloudflare's paginated deployment envelope. This is an unreleased source change; published v0.1.8 stays immutable.

Changes

  • Add a stdlib SigV4 R2 PUT/GET transport that derives credentials in memory from the existing account-owned API token after fixed account self-verification. No extra persistent S3 secret or account-wide R2 grant is introduced.
  • Require an explicit s3 or wrangler-rest cache transport. Preserve candidate/environment/bucket identities, raw-byte readback, bounded operations, partial journals, and authorization before every PUT/retry and final Worker upload. No automatic REST fallback.
  • Reverify completed cache objects on resume. Document the post-connect 90-second exchange deadline and the native DNS/connect boundary.
  • Migrate four existing fixture declaration literals to wrangler-rest; preserve all existing cases and assertions. No tests were added or manually run.
  • Accept both direct deployment results and the transport's result/result_info envelope for recovery. Reject malformed or ambiguous envelopes, invalid version rows, and mixed active rollouts. Generic transport and custom-domain pagination remain unchanged. This addresses the response-shape failure retained from hosted recovery capture 38165763297.

Evidence:

  • Automatic push CI 38165801085 passed at the S3 commit 8f50e00806bed7996788e490c0d46636ad6f62fe: Python discovery 200 tests (3 framework skips), Swift 4 tests, separate framework-runtime 2 tests and cache suite 12 tests. These are existing regression checks, including the explicit REST fixtures; they do not establish new S3 transport acceptance.
  • Automatic push CI 38166368988 passed for current head 9adbeeb9427b49b96fec995695646cfa196bdda6: both required jobs succeeded, with Python discovery 200 tests (3 framework skips), Swift 4 tests, separate framework-runtime 2 tests and cache suite 12 tests. No manual dispatch or rerun was performed.
  • Current-head Python syntax, Ruff, and focused diff checks pass. Independent focused source review is clear.

Follow-ups and Next Work

  • New S3 signing vectors/independent signer comparison and controlled live bucket-selected-token PUT/GET acceptance remain unproved. No live token verification or object operations were performed for this implementation.
  • Real recovery capture/restore remains unexercised after the envelope correction; the previous failed capture is retained evidence, not recovery acceptance.
  • Future cache-enabled product callers must explicitly declare their transport before adopting a future runtime release. No product pin changes are included.
  • No release, version bump, tag, merge, provider mutation, credential creation/read, or product adoption is performed by this PR. Complete the pending acceptance and normal release review separately.

WillieCubed and others added 2 commits October 11, 2026 11:54
Use the existing account-owned deployment token to derive ephemeral in-memory
S3 signing credentials after fixed account self-verification. This avoids
requiring an account-wide R2 REST grant for bucket-selected object policies.

Require an explicit transport for future cache candidates, preserve the native
REST option without fallback, and bind transport, endpoint and byte inventory
to candidate-scoped journals. Bound HTTP exchanges and cache inventories,
verify full readback digests, reconcile resumed objects, and recheck approval
immediately before every PUT attempt. Preserve immutable v0.1.8 consumers.

Document the DNS/deadline boundary and pending signing/provider acceptance.
Migrate four existing REST fixture declarations without changing their cases
or assertions. Ruff, Python compilation and diff checks passed; no tests ran
under the task restriction. No release version or dependencies changed.

Co-authored-by: Codex <noreply@openai.com>
Cloudflare deployment lists retain result_info, so the shared transport returns
an envelope instead of the direct deployment object expected by recovery.
Normalize this endpoint without changing generic pagination. Reject malformed
rollout rows and ambiguous envelopes before selecting one complete version.

Static Ruff, Python syntax and diff checks passed. No tests were added or
manually run, and provider recovery acceptance remains pending.

Co-authored-by: Codex <noreply@openai.com>
@WillieCubed

Copy link
Copy Markdown
Contributor Author

Superseded by #9, now merged as 37fe36f. The company websites now use native OpenNext/Wrangler commands, and the custom website release/cache machinery this draft extends has been removed from the shared release engine.

The six changed paths contain only that website/S3/recovery slice; no unrelated work was identified. Closing this draft without merging, deleting its branch, publishing a release, or changing provider resources. Its source and prior acceptance limitations remain in the retained branch and PR history.

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.

1 participant