Skip to content

docs(cms): media on R2 in the record (PC4) - #17

Merged
ruehowl merged 4 commits into
mainfrom
orun/PC-7-record
Oct 28, 2026
Merged

ruehowl merged 4 commits into
mainfrom
orun/PC-7-record

Conversation

@ruehowl

@ruehowl ruehowl commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

What

The record for milestone PC4 (media on R2). #15 (the bucket), #16 (the media collection) and #18 (the deploy fix) have all landed, and main run 40666021733 deployed the CMS with R2_MEDIA on stage and prod.

  • ai/context/operations.md, the CMS section, now covers:
    • media: the buckets, the R2_MEDIA binding, the file route, what may be uploaded, and the R2 token
    • migration 205_cms_media
    • the resources' real names, which carry the environment prefix (stg-…, prod-…)
    • a media verify command
    • the two one-time R2 owner steps: enabling R2 on the account, and minting CLOUDFLARE_R2_TOKEN
    • the CMS deploying with skipResourceProvisioning: true
  • IMPLEMENTATION-STATUS.md marks PC4 shipped. It records:
    • the live verification
    • what is not yet verified live, below
    • the departures: two tasks and three PRs, namespace-prefixed names, the token as a rotated project secret, abortOnLimit, no SVG and no resizing
    • the findings, PC-K and R2's account switch
  • Risks:
    • PC-F is resolved.
    • PC-K is new: wrangler's provisioning reads R2 with the deploy token. It's fixed by stack-tectonic 0.21.0 and confirmed live.
    • PC-I is brought up to date with the 0.21.0 pin, including the 3 of 19 package suites that fail locally.
  • The epic README reads shipped for PC0–PC5.

Live verification (read-only)

stage prod
deploy log binding env.R2_MEDIA (stg-lumen-payload-cms-media-stage) env.R2_MEDIA (prod-lumen-payload-cms-media-prod)
/health {"status":"ok","db":"ok"} {"status":"ok","db":"ok"}
GET /api/media 200, empty list 200, empty list
anonymous POST /api/media — 403
CMS suite in the lane 65 passed 65 passed

Not yet verified live: a staff upload served back from R2. No staff account exists until the owner sets CMS_SETUP_TOKEN and opens /setup. The same path passed end to end on the built Worker in workerd with a local R2 bucket.

Docs only: orun plan --changed plans nothing for it.

🤖 Generated with Claude Code

https://claude.ai/code/session_013JuHbkZCjDrGgHdzCrCRqG

…(PC4 record)

operations.md's CMS section gains media (the buckets, the binding, the
file route, what may be uploaded, the R2 token), migration 205, the
resources' real prefixed names, a media verify command, and the two
one-time R2 owner steps in place of "media waits on R2". 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
…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
The stage deploy of bc8c24c reports 3356 KiB gzipped, so the operating
contract's "about 3.8 MiB" was wrong; it goes back to 3.3 MiB.

Orun-Task: PC-7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013JuHbkZCjDrGgHdzCrCRqG
Main run 40666021733 deployed the CMS with R2_MEDIA bound on both
environments through the workers-deploy token: /api/media answers, an
anonymous upload is refused, and the suite passed in each lane. A staff
upload served back from R2 is not yet verified live, because no staff
account exists until the owner opens setup; the same path passed end to
end in workerd. PC-K notes the live confirmation.

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:47
@ruehowl
ruehowl merged commit 1ada677 into main Oct 28, 2026
2 checks passed
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