Repository navigation
Description
Summary
design.sahajatlas.com is served by the Cloudflare Pages project sahajatlas-design,
built from this repo by pnpm ladle:build into build/. Move it to Cloudflare Workers
static assets and delete the Pages project once the replacement is verified working.
Nothing embeds this address, so it is the cheapest place to learn how a Workers move
behaves — and three facts that only a live Worker can settle are read off it here, before
any sibling move is started.
Goal context
Child 1 of 5 of #266, and its deliberate rehearsal. It produces the
three live findings the later children are planned against, the public/_headers ACAO rule
sydevs/SahajCloud#913 depends on, and the branch_excludes recipe the We Meditate library
move reuses.
Approach
Repo-side (this is the PR)
1. A wrangler config for the design Worker. The repo has none today (verified: no
wrangler* file at any depth). Two Workers will eventually build from this one repo, so
give this one a distinct filename — wrangler.design.jsonc — and name the Worker
sahajatlas-design, which keeps continuity with the Pages project name, public/robots.txt:3
and the docs, and stays tellable from the app's future sahajatlas Worker.
- assets-only: no
main assets.directory=build(pnpm ladle:buildisladle build && pnpm assert:maps ../build;
scripts/assert-no-sourcemaps.mjs:36-38recordsbuild/as this target's output)assets.not_found_handling="single-page-application"preview_urls: true- a
previewsblock even if empty —cloudflare/wrangler-actionthrows without one
(Preview checks build on GitHub Actions SahajCloud#903's Technical notes,ensure-config.ts:167,212). Confirm the exact key
against the Workers configuration docs through the cloudflare-docs MCP before writing it;
child 4 is what actually needs it.
⚠ The Worker's preview host is <preview>-<worker>.<subdomain>.workers.dev. sahajatlas-design
therefore contains sahajatlas as a prefix, exactly as the two Pages projects do today. A later
check must match the worker-name label segment, not a domain suffix —
scripts/get-cloudflare-preview-url.test.ts:49-55 already pins that boundary for the Pages
shape. Record the constraint for child 4; do not rename to work around it.
2. Add wrangler as a devDependency. None today (checked package.json and
pnpm-lock.yaml). 4.149.0 is current; 4.135.0 is the floor for wrangler preview delete,
which finding 2 below needs, and Workers Builds uses the Wrangler version in package.json.
3. public/_headers — ask for ACAO deliberately. Workers static assets add no
Access-Control-Allow-Origin; their only defaults are Content-Type, Cache-Control, ETag
and CF-Cache-Status. Pages adds ACAO * to every asset, which is why
design.sahajatlas.com/robots.txt carries it today although public/_headers pins ACAO on only
three patterns: /assets/* (:15), /auto.js (:36), /embed.js (:40).
sydevs/SahajCloud#913 depends on a library's assets being readable cross-origin.
⚠ Do not simply add ACAO to the existing /* block. public/_headers:55-57 records that
the platform applies every matching rule and joins repeated values with a comma, so a second
ACAO rule would serve Access-Control-Allow-Origin: *, * on /assets/*, /auto.js and
/embed.js — an invalid value that breaks the #91 font case. The invariant to hold is that
exactly one ACAO rule matches any given path: lift the header to one site-wide rule and leave
the three existing blocks their Cache-Control only. tests/smoke/cache-headers.smoke.test.ts:63-71
asserts access-control-allow-origin === '*' exactly, so a comma-joined value fails a live spec
rather than shipping.
⚠ public/_headers is copied into both build outputs (AGENTS.md:293-295), so whatever you
write also reaches the Pages app. Pin today's behaviour, do not widen it — Pages already
serves ACAO * on every asset, so making it explicit changes no observable behaviour on
sahajatlas.com. Say in the file's comment why the rule exists: it is a Pages default that
Workers does not provide, and a rendering requirement rather than a nicety.
4. ⚠ Do not delete public/_redirects:7 (/* /index.html 200) in this ticket. That file
is shared by both build outputs and sahajatlas.com is still on Pages and depends on it
(tests/smoke/spa-fallback.smoke.test.ts). Instead measure on the live design Worker whether
a _redirects splat suppresses public/_headers's /* X-Robots-Tag: noindex on a rewritten
deep link — redirects run before headers on Workers — and record the result. Child 5 deletes the
line.
5. The sahajatlas-design doc sweep. Rewrite in the past tense. The full inventory, verified
at c4b6b8a:
| File:line | What it says now |
|---|---|
AGENTS.md:65 |
the Deploy table row, "Cloudflare Pages — sahajatlas (app) plus sahajatlas-design (Ladle)" |
AGENTS.md:269-280 |
"Two Cloudflare Pages projects … both on the current Node 22 build image", the two bullets, and "there is no wrangler config or _routes.json" — which this PR falsifies |
AGENTS.md:293-295 |
public/ copied into both outputs, "so all three files also govern sahajatlas-design" |
AGENTS.md:333 |
"Use the cloudflare-docs MCP for Cloudflare Pages questions" |
docs/architecture.md:106-115 |
"two Cloudflare Pages projects", and "The repo carries no wrangler config and no _routes.json" |
docs/testing.md:219-220 |
the 16-spec non-vacuity measurement, recorded against sahajatlas-design.pages.dev — the address this ticket deletes |
docs/environment.md:81-84 |
"sahajatlas-design (the Ladle playground): do NOT add them" |
docs/mcp-setup.md:29-32 |
"This app deploys to Cloudflare Pages (projects sahajatlas and sahajatlas-design)" |
README.md:184-187 |
"Two Cloudflare Pages projects build from this repo" |
public/robots.txt:3, :31 |
the shared-policy note, and the runbook line naming sahajatlas-design.pages.dev |
scripts/assert-no-sourcemaps.mjs:34-38 |
"This repo ships two Cloudflare Pages projects" |
scripts/get-cloudflare-preview-url.mjs:84-88, :237-240 |
the sibling sahajatlas-design Pages check run used as corroborating timing evidence, and the slug comment that tells our run from it. That check run stops existing when the Pages project is deleted |
scripts/get-cloudflare-preview-url.test.ts:55, :247, :328 name the string
sahajatlas-design.pages.dev as pinned test fixtures (the refused sibling, the hostname
boundary). They are literals under test, not claims about live infrastructure, so they stay —
account for them explicitly rather than editing them.
docs/rules/code-comments.md forbids dropping a ⚠ line, a #NNN breadcrumb or a cross-repo
pointer. Compress; do not clear-cut.
Attended (Cloudflare dashboard, DNS, or the Cloudflare API)
No cloud run can perform any of these. A run that picks this ticket up does the repo-side
phase, opens the PR, and hands back with this list.
- Create the Worker, connect the repo, build command
pnpm ladle:build, outputbuild/,
the wrangler config path. This project carries no build-time variables (both design
projects have none, andvarsin a wrangler config is runtime-only). Read the first build
log for the Node and pnpm it actually used:.node-versionis22.17.0andpackage.json:6
pins[email protected], while the Workers build image defaults to Node 24.18.0 and pnpm 10.11.1,
and whether it honours.node-versionis undocumented.AGENTS.md:269-270currently claims
both projects run "on the current Node 22 build image" — the log is what replaces that claim. - Keep preview builds on, and set
branch_excludes/path_includeson the Builds trigger
throughPOST/PATCH /accounts/{id}/builds/triggers. The dashboard cannot express either —
it offers only a production branch. Read today's watch paths off thesahajatlas-design
Pages project before deleting it (the Cloudflare dashboard holds them, not this repo), mirror
them, and excludegh-readonly-queue/*. Switching previews off altogether is explicitly refused
by Our Cloudflare Pages sites move to Cloudflare Workers, at no extra cost #266 — it would re-create the We Meditate check's silent green that child
2 exists to close. - The rollback drill, with clock times. Write down the single action that puts the address
back, perform it, confirm the old site answers again, then move the address forward a second
time. All three steps recorded with their times. - Move the address, run Our Cloudflare Pages sites move to Cloudflare Workers, at no extra cost #266's four-part "verified working" gate, then
delete the Pages project. ⚠ Take the hostname off Pages and confirm it gone first:
otherwise deleting the project takes the DNS record the new site depends on, and the address
goes dark on the day it was declared working.
Interfaces
Provides
- The three live findings below, which children 2, 3 and 4 are planned against.
- The
public/_headersACAO rule design.sydevelopers.com shows every project's component library in one place SahajCloud#913 depends on. - The
_redirects-versus-not_found_handlingmeasurement child 5 acts on. - The
branch_excludesrecipe child 2 reuses, and the watch-path list read off the Pages project
before it is deleted. - The re-measured 16-spec non-vacuity number, which
docs/testing.md:219-220loses its subject
for the moment this ticket deletessahajatlas-design.pages.dev.
Consumes nothing. This is the first child.
Phases
- Repo-side, one PR: the wrangler config, the
wranglerdevDependency, thepublic/_headers
ACAO rule, and the doc sweep. Pushable and reviewable on its own — it changes no live site,
because no Worker exists yet. - Attended Cloudflare work, in the order listed above: create the Worker and read the first
build log → the Builds trigger API call → the three findings and the two measurements → the
rollback drill → the address move and the four-part gate → delete the Pages project. A run
stops after phase 1 and hands this list back.
Acceptance criteria
Repo-side
-
wrangler.design.jsoncexists: nomain,assets.directory=build,
assets.not_found_handling="single-page-application",preview_urls: true, a
previewsblock, and the Worker namedsahajatlas-design. -
wrangleris a devDependency at4.149.0or later (floor4.135.0). -
public/_headersservesAccess-Control-Allow-Origin: *for every path, and exactly one
ACAO rule matches any given path — no path can receive a comma-joined value. -
public/_redirectsis byte-identical tomain. - Every
sahajatlas-designoccurrence in the repo is either rewritten in the past tense or
accounted for as a pinned test fixture. The inventory above is the closed list. -
AGENTS.mdanddocs/architecture.mdno longer claim this repo carries nowrangler
config, and no longer describe two Cloudflare Pages projects. -
docs/testing.md:219-220cites the re-measured number againstdesign.sahajatlas.com
rather than an address that no longer exists. - No
⚠line,#NNNbreadcrumb or cross-repo pointer was deleted by the sweep. - No file under
.claude/was written.
The findings this ticket exists to produce — each written into
#266's Technical notes block
- 1. Cloudflare's own name for a Workers build check run, and whether Workers Builds
posts one to GitHub at all..github/workflows/production-smoke.yml:15-16is triggered by
check_run: [completed]and nothing else barworkflow_dispatch, so if none is posted that
lane has no automatic trigger and child 4 needs a different one. Record also whether the
name identifies which Worker built::40tells the app's Pages build from the playground's
by the name alone, so a name that does not carry the Worker's would let a design deploy fire
the atlas production lane once child 4 rewrites that filter. - 2. Whether a preview of an assets-only Worker can be created and then taken down
(npx wrangler preview delete --name <preview>), and that its address then shows nothing.
The whole build order rests on this: Maintainers can mock up a goal's new screens with Claude, from the components we already have SahajCloud#910's promise that a mockup can be
removed depends on it. - 3. Whether a Worker route can sit in front of a live Pages CNAME, or whether the
hostname must come off Pages first and the address go dark in between. - The
_redirectsmeasurement: whether a_redirectssplat suppresses
public/_headers's/* X-Robots-Tag: noindexon a rewritten deep link on Workers. - The non-vacuity measurement, taken BEFORE the Pages project is deleted: the number of
this repo's 16 live-site smoke specs that fail against the newdesign.sahajatlas.com,
written into both Our Cloudflare Pages sites move to Cloudflare Workers, at no extra cost #266 anddocs/testing.md.
Attended, performed by a person
- The Worker builds from this repo with
pnpm ladle:buildintobuild/, and the first build
log's Node and pnpm versions are written into Our Cloudflare Pages sites move to Cloudflare Workers, at no extra cost #266. - Preview builds are still on, and
branch_excludes/path_includesare set through the
Builds trigger API, mirroring the Pages watch paths and excludinggh-readonly-queue/*.
A push to a branch the rules exclude starts no build. - The rollback drill was performed, and the single rollback action, the old site answering
again, and the second forward move are all recorded with clock times. -
design.sahajatlas.comopens its component list in a browser, with readable text in
Raleway rather than a fallback font. - The hostname was removed from the Pages project and confirmed gone before the project
was deleted, and the Worker holds the address in its own right. - The
sahajatlas-designPages project is deleted, and it is recorded in
Our Cloudflare Pages sites move to Cloudflare Workers, at no extra cost #266 that there is now no way back other than building a site from
scratch. - No outage window was booked, and Our Cloudflare Pages sites move to Cloudflare Workers, at no extra cost #266 records the one-line reason:
nothing embeds this address, so no partner page loses anything.
Verification checklist
Repo-side — runnable cold
-
pnpm install && pnpm lint && pnpm typecheck && pnpm test:run— all green. -
pnpm ladle:buildexits 0 andbuild/index.htmlexists. -
npx wrangler --versionprints4.149.0or later. -
grep -c '^ Access-Control-Allow-Origin' public/_headersreturns1(the prose at:5
mentions the header too, so anchor the match to an indented rule line). -
git diff --stat origin/main -- public/_redirectsprints nothing. -
grep -rn 'sahajatlas-design' . --exclude-dir=node_modules --exclude-dir=.git— every hit
matches the inventory table above, and each is either past tense or a named test fixture. -
git diff origin/main -- '*.md' public/ scripts/ | grep -E '^-.*(⚠|#[0-9]{2,3})'— every hit
is a line reflowed or rewritten rather than dropped, confirmed one by one against the+
side of the same hunk. -
git diff --name-only origin/main | grep '^\.claude/'prints nothing.
Against the live Worker — a person runs these
-
curl -sI https://design.sahajatlas.com/ | grep -i access-control-allow-originreturns
exactly*(not*, *). -
curl -sI https://design.sahajatlas.com/this-does-not-exist | grep -i x-robots-tag— record
whethernoindexis present. That answer is the_redirectsmeasurement. -
PREVIEW_URL=https://design.sahajatlas.com pnpm test:smoke— record how many of the 16
specs fail.tests/smoke/_helpers/preview.ts:9is where that variable is read. - Open
https://design.sahajatlas.comin a browser: the component list renders, in Raleway. - Push a commit to the Worker's production branch, then list the check runs on that commit
and record each one's name and app slug. Confirm none of them satisfies
.github/workflows/production-smoke.yml:37-41'sif, so a design deploy cannot fire the
atlas production lane. - Push a branch, find its preview host,
npx wrangler preview delete --name <preview>, then
curl -si <that host>and record what it answers. - Attempt a Worker route over the live Pages CNAME and record what happens, before the
hostname is moved. -
curl -sI https://sahajatlas.com/embed.js | grep -iE 'access-control-allow-origin|cache-control'
after the PR deploys to the Pages app — ACAO is exactly*, andCache-Controlstill
max-age=0, must-revalidate. This is the shared-file check for the site this ticket does
not move.
Notes
.claude/workflow.json:25reads"deployTarget": "Cloudflare Pages (sahajatlas, sahajatlas-design)".
It goes partly stale here, it is a protected path, and no cloud run can write it — a run that
tries waits out its lease having written nothing. It is corrected by an attended edit at child 5,
and it is deliberately not an acceptance criterion here.- ⚠
.claude/workflow.json:14→securityReview.triggerPatternmatches no wrangler config. So
the one file deciding what the Worker serves, what it rewrites and which headers reach a host page
would escape the security review thatvite.config.tsandpackage.jsonalready fire. Read at
c4b6b8a, the pattern names neitherwrangler*norpublic/, sopublic/_headersescapes it
too. Attended, exactly likedeployTargetabove: the file is a protected path, no cloud run
can write it, and this is deliberately not an acceptance criterion. One attended edit settles
both of this repo's configs — this ticket'swrangler.design.jsoncand the app's, which
chore(build): serve the atlas app from a Cloudflare Worker #280 adds. ci(preview): move the Ladle site to Workers and fail on no preview WeMeditateWeb#184 records the same finding for its own copy,
whose pattern anchors on^wrangler\.toml. - Deleting the
sahajatlas-designPages project removes a check run that
scripts/get-cloudflare-preview-url.mjs:84-88cites as corroborating timing evidence (a median
41 seconds ahead of our own). The script's own comment already says neither that run nor the bot
comment is load-bearing alone, andrunProject(:244) simply stops matching it, so no spec
and no CI gate breaks — the prose is what goes stale. Child 4 deletes the subsystem outright. - No
docs/embedding.mdorCHANGELOG.mdentry is owed by this ticket. The ACAO rule makes
explicit a header Pages already serves on every asset, so no host can observe a change on
sahajatlas.com, and nothing embedsdesign.sahajatlas.com. Child 5 owns the embed guide. - chore(build): cut every client over to sahajatlas.com and retire the legacy hosts #252 (under Sahaj Atlas is ready for launch #255) plans its own edit to
public/_redirectsand todocs/embedding.md. Whichever of the two lands second reconciles. wrangleris a dev-scope dependency, so the shared Dependency Review gate — which fails only
on an added dependency with a high or critical runtime advisory — does not bear on it.- The siblings are not filed yet, so they are named by description rather than by number. In
build order: this ticket, then the We Meditate library move (sydevs/WeMeditateWeb), then the
atlas app Worker, then the atlas preview lane, then thesahajatlas.comcutover.
Our Cloudflare Pages sites move to Cloudflare Workers, at no extra cost #266'sTechnical notestable carries the order.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Hold Until
Projects
- StatusShow more project fieldsDone
Activity
sydevs-bot commentedon Oct 13, 2026
🤖 no session running
recent dispatches
Written by the sydevs dispatcher. Sessions never edit this comment.
docs(build): say why the previews block is here, not that wrangler ne…
chore(build): move the Ladle playground to Cloudflare Workers (#294)
fix(build): drop _redirects from the Ladle build the design Worker de…
docs(deploy): record the design Worker's first build and smoke measur…
chore(build): serve the atlas app from a Cloudflare Worker (#297)
Ardnived commentedon Oct 14, 2026
Attended phase complete:
design.sahajatlas.comserves from thesahajatlas-designWorker as a Custom Domain, and the Pages project is deleted. Findings, measurements, rollback times and the cutover timeline are recorded on the parent: #266 (comment)chore(workflow): name the Workers deploy target and review wrangler c…