Repository navigation
CS3: cms-sanity becomes an Orun baseline - #4
Merged
Merged
Conversation
The Sanity-backed Next.js blog on Cloudflare Workers + Static Assets becomes
a baseline that takes a new blog from nothing to live on stage and prod in
ONE landing, built the way cirrus-baseline builds its product since
baseline-v22, with what a small-site baseline contains taken from
portfolio-starter-kit's baseline-v2 and the no-infra two-phase shape from
hono-api (HA3) — and deployable before its owner has a Sanity project.
- blueprint.yaml (the card) and repo-blueprint.yaml (the build): two
phases. 01-product places every module, brands it, re-tenants it, strips
the work tree, defers promotion and dev's push lanes, creates and links
the repository, reconciles CLOUDFLARE_API_TOKEN (workers-deploy) and
CLOUDFLARE_ACCOUNT_ID (account-id), lands one PR, and awaits the
convergence and a probe of both workers.dev URLs. No wiring await: there
is no infra. 02-docs is hook-only: it restores both deferrals, renders the
deployment record and lands it. requires.integrations: [github,
cloudflare]; nothing is asked or minted for Sanity.
- Sanity is not a provider the platform brokers, so a build with no project
id is the UNCONNECTED blog instead of a 500: sanity/lib/api.ts and
token.ts no longer throw; sanityFetch answers the four queries from three
bundled sample posts (sanity/lib/sample.ts, typed by TypeGen's results)
without calling Sanity; the layout shows a "connect your Sanity project"
notice; /studio renders a connect page; draft mode answers 401 with the
reason. The project id and dataset are optionalSecretEnv refs (skipped
while unstored), the read token an optional Worker secret; the product's
README ("Connecting Sanity") and ai/context/operations.md say how an owner
sets all three, redeploys, and allows the CORS origins.
- The SITE_NAME seam (apps/web/app/site.ts, the template's "Blog."); the
rebrand engine protects the upstream template's examples/cms-sanity links,
which share the slug. The smoke reads the home page's layout and the
draft-mode route's 401 (server code only the Worker answers).
- .baseline/ (identity, the two task contracts, the blog's README), the
bootstrap helpers, the deployment-record hook (which records whether each
environment shows samples or the project's content), ai/context,
docs/phases, BOOTSTRAP.md, baseline.yml and tag.yml; tooling/wire from
kv-redis-starter; infra/ and packages/ discovery roots.
- ci.yml plans nothing only while intent.yaml names ws_CHANGE_ME (no ORUN_CI
variable) at orun v2.78.4; checks.yml runs on pull requests only and
checks the committed wrangler config is the fixture render;
stack-tectonic 0.19.0; .dev.vars.example ships (the ignore glob no longer
swallows it).
- testing/: manifest, phases (the two-phase partition and cirrus's
01-product hook chain), coverage, rebrand (the upstream link survives,
an "&" and "'" name), retouch, bootstrap-defer, leak (every shipped file
read for factory paths), placement (the offline bootstrap on orun's
Initial commit, the product's own push-to-main plan through ci.yml's
--from-ci github --event-file path with the Sanity refs optional, a
--resume no-op) and e2e (both landings under Checks, every run step of
the stage lane's PR plan in a staged job tree with no Sanity credentials,
wrangler dev, the component's smoke verbatim and in the planned smoke
step, every route including draft mode's 401).
Orun-Task: CS-4
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AuyckrXahuAVgdmxamUUtk
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.
CS3 (task CS-4): the Sanity-backed Next.js blog on Cloudflare Workers + Static Assets becomes an Orun baseline that takes a new blog from nothing to live on stage and prod in ONE landing (cirrus-baseline v22's shape), with what a small-site baseline contains taken from portfolio-starter-kit
baseline-v2and the no-infra two-phase shape from hono-api (sourceplane/hono-api#4). It deploys before its owner has a Sanity project.What was added
The card and the build
blueprint.yaml: inputs (reponame, productname, productdomain, githuborg, subdomain), the brokered-secrets preview (CLOUDFLARE_API_TOKEN/workers-deploy,CLOUDFLARE_ACCOUNT_ID/account-id), the programme (01-product,02-docs),requires.integrations: [github, cloudflare],expectedMinutes: 14. Nothing is asked for Sanity.repo-blueprint.yaml: two phases.01-productplaces every module. Post hooks: retouch, git-init, git-stage, rebrand, orun-workspace,work-tree --strip,promotion --defer,dev-lanes --defer, git-restage, rebrand-verify, pnpm lockfile,orun.repo/ensure@v1, link, oneorun.integrations/reconcile@v1per key,orun.pr/land@v1.orun.run/watch@v1on the merge sha, thenorun.http/probe@v1on both workers.dev URLs. There is noorun.secrets/exists@v1await because there is no infra.02-docsis hook-only: it restores promotion and dev-lanes, renders the deployment record, lands it, and probes.Sanity, which the platform does not broker (rule 8)
sanity/lib/api.tsandsanity/lib/token.tsno longer throw.sanityFetchanswers the four queries from three bundled sample posts (sanity/lib/sample.ts, typed by TypeGen's results) without calling Sanity./studiorenders a connect page instead of a Studio pointed at no project./api/draft-mode/enableanswers 401 with the reason.optionalSecretEnvrefs, notsecretEnv. Unstored keys are skipped at resolve; both orun 2.58.11 and 2.78.4 plan themoptional: true.ai/context/operations.mdcover:orun secrets set SANITY_PROJECT_ID|SANITY_DATASET --env stage|prod;# orun: redeployline);wrangler secret put SANITY_API_READ_TOKEN.r0z1eifg/blog-vercel) does still answer. The template doesn't read it by default, though, so bundled samples were chosen instead.Identity and the rest
SITE_NAMEseam (apps/web/app/site.ts, the template'sBlog.).vercel/next.js/tree/canary/examples/cms-sanitylinks, which share the slug..baseline/(identity, the two task contracts, the blog's README),tooling/bootstrap,hooks/render-deployment-docs.sh,ai/context,docs/phases,BOOTSTRAP.md,baseline.yml,tag.yml.tooling/wirecopied from kv-redis-starter.infra/.gitkeepandpackages/.gitkeepadded.ci.yml: thelinkedgate (it plans nothing only whilews_CHANGE_ME) at orun v2.78.4.checks.yml: pull requests andworkflow_dispatchonly, withgit diff --exit-codeafterwire:fixture..dev.vars.examplenow ships: the old**/.dev.vars.*ignore glob swallowed it.testing/: manifest, phases, coverage, rebrand, retouch, bootstrap-defer, leak, placement, e2e.How it was verified
Everything was run locally on the committed head (
8b7f3d9) with no Sanity values in the environment. The tree was clean before and after.pnpm install --frozen-lockfile,wire:fixtureandgit diff --exit-code;unconnected.test.tsandsite.test.ts;git diffis clean.manifest,phases,coverage,rebrand,retouchandbootstrap-deferall pass. The rebrand fixtures include a name with&and an apostrophe, and check that the upstreamexamples/cms-sanitylink survives.leak.test.sh, at orun v2.58.11 and 2.79.0:.dev.vars.exampleships.placement.test.sh, at v2.78.4 and 2.79.0:--from-ci github --event-file … --changed) deployswebto stage and prod side by side. There is no infra, so nothing is ordered before it.verify-app-structureruns beforebuild-app, and the Worker, smoke and Cloudflare refs are the product's;optional: true;--resumeis a no-op.e2e.test.sh, at v2.78.4:verify-app-structure,build-app,verify-build-outputanddeploy-dry-run. The tree has its own install and no build output. The dry run is 7.9 MB, 1.6 MB gzipped.wrangler devserves the staged Worker.smokestep with only its workers.dev URL swapped for the local one. It refuses a path that is not the blog./;/studioand/studio/structure, which show the connect page;_next/staticchunk;/api/draft-mode/enable, which answers 401 with the reason.orun new --statuspasses at v2.58.11, v2.78.4 and 2.79.0;orun validatepasses at all three;orun work checkis clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01AuyckrXahuAVgdmxamUUtk
Generated by Claude Code