Skip to content

fix(cms): deploy without wrangler's R2 provisioning check (stack-tectonic 0.21.0) - #18

Merged
ruehowl merged 1 commit into
mainfrom
orun/stack-0.21
Oct 28, 2026
Merged

ruehowl merged 1 commit into
mainfrom
orun/stack-0.21

Conversation

@ruehowl

@ruehowl ruehowl commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Why

The PC4 merge (#16) didn't make it live. Main run 40659792149 failed its stage and prod cms lanes at deploy, after wire-live passed:

A request to the Cloudflare API (/accounts/***/r2/buckets/stg-lumen-payload-cms-media-stage) failed.
Authentication error [code: 10000]

wrangler 4 provisions resources by default. For the new R2_MEDIA binding it first reads the bucket over the R2 API, using the brokered workers-deploy token, which has no R2 permission. The bucket is Terraform's (cloudflare-r2-cms, live on both environments), so the check adds nothing. Until this lands, the old CMS (without media) keeps serving, and migration 205 is applied, which is additive and harmless.

What

  • intent.yaml: the stack pin moves from stack-tectonic:0.20.0 to 0.21.0. sourceplane/stack-tectonic#22 added an opt-in skipResourceProvisioning switch to cloudflare-worker-turbo.
  • apps/cms/component.yaml: sets skipResourceProvisioning: true, so the deploy step runs wrangler deploy … --x-provision=false. No other component opts in, so their deploy commands stay as they are.
  • apps/cms/docs/runbook.md: adds this failure and its cause to the Common failures list.
  • tasks/PC-7.TaskContract.yaml: intent.yaml is added to affects.

Nothing else in the 0.20.0 → 0.21.0 move touches this repository. 0.20.1 fixed turbo-package's command guards, but 26 of the 27 turbo-package components subscribe on quick-check, which runs none of those steps. The only one on verify (tests/cms) declares no commands, so it renders the same as before.

Verification

  • orun plan --component cms --trigger github-push-main against the published 0.21.0: the stage and prod deploy steps both pass --x-provision=false.
  • wrangler 4.116.0 against a local mock of the Cloudflare API, with an R2_MEDIA binding:
    • Without the flag: GET …/r2/buckets/<name> and Authentication error [code: 10000], the same failure as CI.
    • With the flag: no R2 call; the script uploads with the r2_bucket binding.
  • Once this merges, the main run's CMS lanes are the live proof. They should show env.R2_MEDIA bound, /health ok and /api/media answering on stage and prod.

Generated by Claude Code

…onic 0.21.0)

The PC4 merge's deploy (main run 40659792149) failed on stage and prod at
`wrangler deploy`: wrangler 4 provisions resources by default and, for the
new R2_MEDIA binding, read /r2/buckets/<name> with the brokered
workers-deploy token, which has no R2 permission ("Authentication error
[code: 10000]"). Terraform (cloudflare-r2-cms) already owns the bucket.

stack-tectonic 0.21.0 adds `skipResourceProvisioning`, which passes
--x-provision=false to the deploy. The CMS sets it, and the pin moves from
0.20.0 to 0.21.0. Nothing else in the move touches this repository: 0.20.1
fixed turbo-package's command guards, but 26 of the 27 turbo-package
components subscribe on quick-check, which runs none of those steps, and
the one on verify (tests/cms) declares no commands.

Orun-Task: PC-7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013JuHbkZCjDrGgHdzCrCRqG
@ruehowl
ruehowl marked this pull request as ready for review October 28, 2026 09:39
@ruehowl
ruehowl merged commit bc8c24c into main Oct 28, 2026
4 checks passed
ruehowl pushed a commit that referenced this pull request Oct 28, 2026
…rded

IMPLEMENTATION-STATUS marks PC4 shipped (#15, #16, #18) and records its
departures: two tasks and three pull requests, namespace-prefixed resource
names, the R2 token as a rotated project secret, abortOnLimit, no SVG and
no resizing. The risks file resolves PC-F (token minted, R2 enabled),
records PC-K (wrangler's provisioning reads R2 with the deploy token, fixed
by stack-tectonic 0.21.0's skipResourceProvisioning) and brings PC-I up to
date with the 0.21.0 pin. The operating contract names the deploy setting.

Orun-Task: PC-7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013JuHbkZCjDrGgHdzCrCRqG
ruehowl added a commit that referenced this pull request Oct 28, 2026
The record for PC4 now that #15, #16 and #18 have landed and main run
40666021733 deployed the CMS with R2_MEDIA on stage and prod.
operations.md covers media, migration 205, the prefixed resource names,
a media verify command, R2's two owner steps and the
skipResourceProvisioning deploy setting. IMPLEMENTATION-STATUS marks
PC4 shipped with its live verification, what is not yet verified live
(a staff upload, pending the owner opening setup), its departures and
findings. The risks resolve PC-F, add PC-K and update PC-I; the epic
README reads shipped for PC0-PC5.

Orun-Task: PC-7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013JuHbkZCjDrGgHdzCrCRqG
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.

2 participants