Repository navigation
BL4: blob-starter becomes an Orun baseline - #5
Merged
Merged
Conversation
The repository is an Orun baseline (task BL-5): a console card (blueprint.yaml) and a build document (repo-blueprint.yaml) that take a new product from nothing to live on stage and prod in ONE landing — 01-product places, brands and lands every module, one convergence applies the R2 bucket before the Worker that binds it — then a hook-only 02-docs that records the deployment. Ported from kv-redis-starter's KR4 (cirrus-baseline v22's one landing, portfolio-starter-kit baseline-v2's small-site shape). - The R2 root applied with CLOUDFLARE_API_TOKEN, the workers-deploy key, which cannot touch R2. 01-product now mints CLOUDFLARE_R2_TOKEN from the r2-data template (orun.integrations/reconcile@v1); the root binds it as its provider token; the card's spec.secrets previews it. - apps/web depends on cloudflare-r2, enforced on main, advisory on pull requests; the landing awaits WIRING_CLOUDFLARE_R2 on stage and prod. - wrangler.jsonc committed as the fixture render (verify-app-structure checks it before the build); dev renders the fixture; packages/.gitkeep. - The smoke reads the bucket without writing to it: the delivery route's own 404 for a never-stored name, then the uploader on /. - app/site.ts is the rename seam (SITE_NAME, SOURCE_URL); the Open Graph origin is the request's. - .baseline/, tooling/rebrand, tooling/bootstrap, hooks/, ai/context, docs/phases, BOOTSTRAP.md, testing/ (contract, wire, leak, placement, e2e), baseline.yml and tag.yml; checks.yml pull-request only; ci.yml linked gate; stack-tectonic 0.19.0; orun v2.78.4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AuyckrXahuAVgdmxamUUtk
ruehowl
marked this pull request as ready for review
October 15, 2026 19:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BL4 (task BL-5): blob-starter becomes an Orun baseline, built in ONE landing. It follows cirrus-baseline v22's single landing and portfolio-starter-kit baseline-v2's small-site layout, ported from kv-redis-starter's KR4 (sourceplane/kv-redis-starter#5). The infra is R2 instead of KV.
What was added
blueprint.yaml, the console card: its inputs, three brokered secrets (preview only), the programme (01-product,02-docs),requires: [github, cloudflare]andexpectedMinutes: 14.repo-blueprint.yaml, the build document. It has two phases:01-productplaces every module. Its post hooks, in order: retouch, git-init, stage, rebrand, orun-workspace, work-tree strip, promotion and dev-lanes deferral, restage, rebrand-verify, pnpm lockfile,orun.repo/ensure, link, threeorun.integrations/reconcile@v1hooks, thenorun.pr/land. Its await hooks areorun.run/watchon the merge sha,orun.secrets/existsforWIRING_CLOUDFLARE_R2on stage and prod, and a probe of the two URLs.02-docsis hook-only. It restores the two deferrals, renders the deployment record and lands it.CLOUDFLARE_API_TOKEN, which is theworkers-deploykey and does not grant R2.CLOUDFLARE_R2_TOKENfrom ther2-datatemplate, and the root binds it as its provider token. This is the same pattern cirrus uses withCLOUDFLARE_D1_TOKEN.spec.secretslists the new key. The manifest test holds the card and the hooks to each other.workers-deploy.BLOB_READ_WRITE_TOKENwith the Worker'sBLOBR2 binding. A product built with only the Cloudflare connection can store and serve files from its first deploy. Nothing third-party is left.apps/webdeclaresdependsOn: cloudflare-r2withmode: enforced, plus amodeRulesentry that makes it advisory ongithub-pull-request./api/blobfor a name nobody stored, with a new name on each attempt. The response must be the route's ownNot found404, which only the Worker can produce, and only after reading the bucket. Then/must render the uploader.apps/web/wrangler.jsoncis now committed as the fixture render, with a GENERATED banner. Checks runsgit diff --exit-codeto confirm it.--fixture-envs dev), and the fixture has adeventry.packages/.gitkeepwas added.apps/web/app/site.ts. It holdsSITE_NAMEandSOURCE_URL.metadataBasecomes from the request's origin, so there is noSITE_URL..baseline/: identity, the task contracts and the product README.tooling/rebrand,tooling/bootstrapand the newertooling/wire.hooks/render-deployment-docs.sh. Its probe uses the same read-only bucket check.ai/context/,docs/phases/andBOOTSTRAP.md.testing/with the full suite.baseline.ymlandtag.ymlworkflows.ci.ymlwith thelinkedgate, andchecks.ymllimited to pull requests.tasks/BL-5.tasks/BL-1..4gainedmetadata, without whichorun work checkrefused them. The as-built status and risks BL-E to BL-K are recorded.How it was verified (all offline)
pnpm install --frozen-lockfile,wire:fixture, typecheck, lint, test (11), buildorun new --statusat v2.58.11, v2.78.4 and 2.79.001-productplaces 73 files,02-docsis hook-onlyorun validate,orun work checktesting/{manifest,phases,coverage,rebrand,retouch,bootstrap-defer,wire}.test.shtesting/leak.test.sh(v2.58.11, 2.79.0)testing/placement.test.sh(v2.78.4, 2.79.0)testing/e2e.test.sh(v2.78.4, 2.79.0)BLOBbinding removedLIVE (200) — the Worker reads its R2 bucketterraform validateandfmt -checkoninfra/terraform/cloudflare-r2(1.15.3)Placement details. The test runs the offline bootstrap of both phases, then the product's own
orun plan --trigger github-push-mainfor the 01-product merge:cloudflare-r2applies on stage and prod at lane level 0, resolvingCLOUDFLARE_API_TOKENfrom the product'sCLOUDFLARE_R2_TOKEN.webdeploys at level 1 with theworkers-deploykey. Each deploy waits only on its own environment's apply.--resumerun is a no-op.E2e details.
verify-app-structure,build-app(rendering from a stage wiring document),verify-build-outputanddeploy-dry-runall pass in the staged job tree, withBLOBbound to the document's bucket.wrangler devand runs the component's own smoke check./shows the product's name, links, origin and uploader.Not verified: a live bootstrap (risk BL-G). That covers minting the two tokens, the real
terraform apply(which also needs R2 enabled on the account, BL-J), the real deploy and the probes.🤖 Generated with Claude Code
https://claude.ai/code/session_01AuyckrXahuAVgdmxamUUtk
Generated by Claude Code