Skip to content

chore(build): serve the atlas app from a Cloudflare Worker #280

Closed

Description

@sydevs-bot

Summary

sahajatlas.com is served by the Cloudflare Pages project sahajatlas, built from this
repo by pnpm build into dist/. Create the app's Cloudflare Worker, make it build and
serve the production app at its own workers.dev host, and enter both Workers Builds
variable sets — read back against a list written before anything is typed. The custom domain
does not move here and the Pages project is not deleted: this ticket is the capability the
cutover and the preview lane are built on, verified at an address no visitor uses yet while
Pages keeps serving sahajatlas.com untouched.

Goal context

Child 3 of 5 of #266. It produces the app Worker that the preview lane
(child 4) publishes previews against and that the sahajatlas.com cutover (child 5) points the
domain at. Its read-back of both variable sets is the evidence child 5's cutover rests on —
#266 names the atlas's doubled variable entry as the largest single risk in
the whole goal, because a half-filled preview environment was silently wrong for seven weeks
before (#232).

⚠ #279 shipped its repo-side PR (#294) and was closed with its attended
Cloudflare phase undone
, so no Worker exists in this account yet. Three of the five things
this ticket was written to consume from it were never measured, and are this ticket's to
produce — see ## Interfaces and ## Notes. The two that bear on the PR below arrived anyway:
the public/_headers CORS rule landed, and the _redirects behaviour was settled from
wrangler's own source rather than off a live Worker.

Deliberately out of scope, and the order is why: no custom-domain move, no Pages deletion,
no CI or workflow change beyond the check:wrangler gate this PR's own config needs.
#266 moves sahajatlas.com last, after the We Meditate library, and the
preview lane is its own child. Nothing here is observable by a visitor or by a partner site.

Approach

Repo-side (this is the PR)

1. wrangler.jsonc — the app's Worker config.

#279 landed wrangler.design.jsonc and the wrangler devDependency —
pinned 4.150.0, not the 4.149.0 this ticket first named — so this PR adds neither a
dependency nor a lockfile change. The plain default filename is this Worker's, which keeps the
two tellable apart at a glance. wrangler.design.jsonc answers every key; copy its shape.

  • assets-only: no main
  • assets.directory = dist (package.json:12: pnpm build is
    tsc && vite build && pnpm assert:css && pnpm assert:maps)
  • assets.not_found_handling = "single-page-application"
  • preview_urls: true — not the wrangler default, which its own schema gives as false
  • compatibility_date — required even with no main. wrangler.design.jsonc:14 carries
    2026-10-06, the date the pinned wrangler suggests itself
  • previews: {} — the key is settled, and not from the published docs, which omit it:
    node_modules/wrangler/config-schema.json defines it, and wrangler deploy --dry-run accepts
    it silently while warning Unexpected fields found in top-level field on a deliberately bogus
    sibling key. The negative control is what makes the silence evidence.
    docs/mcp-setup.md:33-37 records that method. Child 4 is what needs the block;
    cloudflare/wrangler-action throws without one (Preview checks build on GitHub Actions SahajCloud#903's Technical notes,
    ensure-config.ts:167,212).
  • Worker name sahajatlas. ⚠ Whether a Worker may take the name of a Pages project that still
    exists is still unmeasured
    — chore(build): move the Ladle playground to Cloudflare Workers #279 was to answer it by creating
    sahajatlas-design beside the Pages project of that name, and never did. Write sahajatlas.
    If Cloudflare refuses the name, use sahajatlas-app and record the refusal in this ticket.
    The name is only a workers.dev label until child 5 attaches the domain, so either is fine;
    what matters is the next point.

⚠ The worker-name constraint binds hardest here. A preview host is
<preview>-<worker>.<subdomain>.workers.dev, and sahajatlas is a prefix of
sahajatlas-design. A check that looks for the substring sahajatlas therefore matches the
playground's host as well as the app's. Any later match must anchor on the whole worker-name
label segment — -sahajatlas.<subdomain>.workers.dev, not a bare substring.
scripts/get-cloudflare-preview-url.test.ts:49-50 already pins exactly this boundary for the
Pages shape (https://evil-sahajatlas.pages.dev and https://sahajatlas.pages.dev.evil.com are
both refused), and :54 is where #294 moved the ⚠ so whoever can violate it reads it. Record
the constraint for child 4; do not rename to work around it.

2. pnpm check:wrangler has to cover this config too.

package.json:22 is wrangler deploy --dry-run --config wrangler.design.jsonc — one config,
named explicitly. Nothing else in this repo reads either file, because Workers Builds holds
the dashboard's copy of the path, so a wrangler.jsonc added without extending the gate is
exactly the drift #279 built the gate against: a rename, a typo, or an
assets.directory that drifts from what pnpm build writes would surface only in a Cloudflare
build log, on main. Extend it to dry-run both configs.

⚠ The app's dry run needs dist/ to exist, exactly as the design one needs build/,
because the check reads assets.directory — which is the drift case worth catching.
.github/workflows/ci.yml:44-59 already runs pnpm build and pnpm ladle:build before the
step, so the ordering holds; cold, the failure names a missing directory and reads like a broken
gate. AGENTS.md:139-147 and docs/testing.md:13 both describe the gate as reading
wrangler.design.jsonc alone. Both change with it.

3. ⚠ Leave public/_redirects byte-identical to main.

sahajatlas.com is still served by Pages and depends on :7 (/* /index.html 200), pinned
by tests/smoke/spa-fallback.smoke.test.ts:18-27. public/ is copied into both build outputs
(AGENTS.md:304), so the file reaches the Worker's dist/ too. Child 5 deletes the line.

The _redirects question this ticket was blocked on is settled — and not as either outcome it
predicted.
#279 read it out of the pinned wrangler's own code rather than
off a live Worker: createAssetsIgnoreFunction seeds its ignore list with _headers and
_redirects before reading any .assetsignore, so a Workers static-assets Worker never
serves or reads _redirects at all
, and its deep-link fallback is assets.not_found_handling
instead. AGENTS.md:304-311 and wrangler.design.jsonc:17-19 now state this. Two consequences,
replacing the two outcomes this ticket used to carry:

  • tests/smoke/robots.smoke.test.ts:44-52 is expected to PASS against the Worker host, on
    / and /search alike. A _redirects splat cannot suppress public/_headers:61-63's
    /* X-Robots-Tag: noindex, because the Worker does not execute the splat; /search reaches
    the same shell through not_found_handling, carrying the /* headers. Measure it rather than
    assuming, and record the result here. Do not weaken the spec either way.
  • No static asset can be shadowed, so /embed.js, /auto.js, /robots.txt and /assets/*
    answer as themselves. The branch where "the _redirects deletion has to move earlier than
    child 5" is void, and nothing needs reporting back to Our Cloudflare Pages sites move to Cloudflare Workers, at no extra cost #266.

The smoke lane is still the detector, not a browser: cache-headers.smoke.test.ts:33-42 and
robots.smoke.test.ts:54-64 both assert the content-type rather than the status, precisely so
a 200-serving shell cannot pass for the file.

4. Source-map upload moves with the build, and a green deploy does not prove it.

SENTRY_AUTH_TOKEN is the only switch: vite.config.ts:81 gates on
command === 'build' && Boolean(process.env.SENTRY_AUTH_TOKEN), :306 sets
sourcemap: 'hidden' from it, and :137-147 fails the build when the token is set without
SENTRY_ORG and SENTRY_PROJECT. pnpm build ends in pnpm assert:maps
(scripts/assert-no-sourcemaps.mjs), which fails on any surviving .map file, on any
sourceMappingURL comment, and on the token's own value appearing in an emitted file. The
upload itself is deliberately non-fatal (AGENTS.md → Deployment, #130), so only the first
Workers production build log proves it ran. docs/environment.md's runbook is the reference;
its step 2 is the under-scoped-token trap that goes green while shipping minified frames.

5. The doc sweep — the app's half only.

#279 (#294) made AGENTS.md § Deployment the one place the topology is
written down
, and collapsed README.md and docs/architecture.md to pointers. That shape is
the thing to preserve: edit the authority, leave the pointers pointing. Read #294's diff and
cover only what is still wrong once it has landed:

File:line What is newly false
AGENTS.md:291-294 the sahajatlas bullet — "the app, on Cloudflare Pages. Builds with pnpm build into dist/ … it has no wrangler config and no _routes.json". The app now also builds as a Worker, from wrangler.jsonc, while Pages still serves the domain. This is the row that must be right — everything else defers to it
AGENTS.md:68 the Deploy table row's "two platforms", which stops counting the targets correctly
AGENTS.md:139-147, docs/testing.md:13 the check:wrangler entries, which name wrangler.design.jsonc alone — see Approach 2
docs/architecture.md:107-116 the Deploy bullet: "the app on Pages, the Ladle playground on Workers static assets". Keep it a pointer; the deep-link fallback half stays true and is why the bullet exists
README.md:185-187, :193-194, :205-207 "Two Cloudflare sites build from this repo, on two platforms"; "the token … lives in the Cloudflare Pages dashboard"; "which Pages project gets the variables and which does not"
docs/environment.md:22, :23, :29, :74 "the Cloudflare Pages environment", "Set it per environment in the Cloudflare Pages dashboard", "Pages sets it in the Production environment", "Add all three variables to the sahajatlas Pages project". The Worker's variables are per Builds trigger, and during this interval both platforms hold them
scripts/assert-no-sourcemaps.mjs:33-42 "This repo ships two Cloudflare sites, on two platforms (#279): sahajatlas builds with pnpm build, into dist/, on Pages". The path mapping stays right; the platform claim does not, since that same dist/ now feeds a Worker

Two rows this ticket used to carry are already done by #294 — check them rather than
re-editing: src/styles/fonts.ts:40-44 now reads "public/_headers sets it site-wide rather
than leaving us on a platform default, and the default genuinely differs: Pages supplies it on
every static asset, Workers static assets supply none", and docs/mcp-setup.md:29-32 is a
pointer to AGENTS.md § Deployment.

⚠ docs/environment.md:28 is wrong today, and the written list depends on it.
VITE_MAPBOX_ACCESSTOKEN's "Where" column reads .env.local alone, but it is absent from the
committed .env and is inlined at build time (src/components/organisms/Mapbox/Map.tsx:436,
MapSearch.tsx:147, src/lib/geocode.ts:73) — so the Pages Production environment must already
hold it, or sahajatlas.com would draw no tiles. Add Cloudflare to that row. A list built from
the table as it stands would have missed the map.

docs/rules/code-comments.md forbids dropping a ⚠ line, a #NNN breadcrumb or a cross-repo
pointer. Compress; do not clear-cut.

Not swept here: the "Cloudflare Pages" wording in vitest.smoke.config.ts:3,
tests/smoke/** headers, public/robots.txt:1, scripts/get-cloudflare-preview-url.mjs, and
.github/workflows/ci.yml:126's CF_PROJECT comment ("the app is the only Pages project").
Every one of those still describes the Pages app that still serves sahajatlas.com, so each is
still true — the app remains the only Pages project through this ticket. The three smoke-spec
comments that credit _redirects with resolving /search
(robots.smoke.test.ts:40, spa-fallback.smoke.test.ts:26, cache-headers.smoke.test.ts:37-40)
describe the Pages host the lane reads in CI, so they stay true too. Child 4 rewrites the
discovery subsystem and child 5 retires the rest.

Attended (Cloudflare dashboard or the Cloudflare API)

No cloud run can perform any of these. A run does the repo-side phase, opens the PR, and
hands back with this list.

⚠ This list grew, because #279's attended phase never ran. H is its
finding 1, and D and F were to be read off its Worker. The first Workers build in this account
is now this ticket's.

A. Write the variable list BEFORE anything is entered, read off the sahajatlas Pages project
itself — not off this ticket.
docs/environment.md's table is the map of which value belongs
where; the dashboard is the authority for which are actually set. The repo predicts these eight
names, with the trigger each belongs on:

Variable Production trigger Preview trigger Evidence
VITE_SAHAJCLOUD_API_KEY yes yes docs/environment.md:29. sahajatlas.com renders keyless because Production sets it; without it a deploy shows the configuration-error screen
VITE_MAPBOX_ACCESSTOKEN yes yes not in .env; inlined at Map.tsx:436. ⚠ docs/environment.md:28 omits Cloudflare — see above
VITE_TURNSTILE_SITE_KEY yes (overrides .env) — docs/environment.md:22. .env ships the always-passes test key 1x00000000000000000000AA; since #103 the form delivers real email, so this key is what stands in front of it
VITE_SENTRY_DSN yes yes docs/environment.md:23, #232
VITE_SENTRY_ENVIRONMENT — (leave unset) yes, preview docs/environment.md:24. Unset, a build defaults to production
SENTRY_AUTH_TOKEN yes recommended docs/environment.md:25, :74-80. Build-time, no VITE_ prefix
SENTRY_ORG with the token with the token vite.config.ts:137-147 fails the build if the token is set and these are not
SENTRY_PROJECT with the token with the token same
VITE_FATHOM_ID read the dashboard — src/views/FullInterface.tsx:62,77. Optional, .env.local in the docs; the repo cannot tell whether analytics is on in production

⚠ Two claims in #266's v1 research notes are stale — do not copy them
into the list.
VITE_HOST no longer exists: #198 deleted it along with public/locales/, and
docs/environment.md:21 records ATLAS_API_KEY replacing it. MAPBOX_SECRET_ACCESSTOKEN is
not a build variable at all — docs/environment.md:36-38 lists it as a secret that must never
reach client code, and sydevs/SahajCloud#903's notes record it as dead. ATLAS_API_KEY and
SAHAJCLOUD_DOCS_PASSWORD are run by hand, never by a build, and belong on neither trigger.

#266 says "seven settings". The repo predicts eight that a build reads, plus
VITE_FATHOM_ID. The count is whatever the Pages project holds — write that number down and
record the difference, because the gap is itself the finding.

B. Create the Worker, connect the repo, build command pnpm build, output dist/, the
wrangler.jsonc path. Read the first production build log for the source-map upload step
with no ✗ sentry: line, and for pnpm assert:maps passing.

C. Enter every value twice. Workers Builds variables are per trigger, and a preview
trigger does not inherit production's, so each set is typed in separately. vars in a wrangler
config cannot substitute: those are runtime bindings, and VITE_* values are consumed at build
time (wemeditateweb/wrangler.toml:24-25 records exactly this). Then read both sets back and
compare them against the written list, name by name
, and put the comparison in this ticket.

D. Record the Node and pnpm the build image actually used. #279 did not
settle it — .node-version is 22.17.0, package.json:6 pins [email protected], and the Workers
build image defaults to Node 24.18.0 and pnpm 10.11.1, with whether it honours .node-version
undocumented. AGENTS.md:299-303 carries that warning for the design Worker; this is the first
build that can answer it. The answer lands here and in #266.

E. Push a second commit and confirm the Worker builds and serves it.

F. Set branch_excludes for gh-readonly-queue/* on the Builds trigger through
POST/PATCH /accounts/{id}/builds/triggers, so a merge-queue push starts no Worker build. The
dashboard offers only a production branch, which is why this is an API call.
#279 was to produce the recipe and did not, so derive it here and record the
trigger configuration as it ends up; child 4 owns the final preview-trigger shape, and child 2
(the We Meditate library move) reuses whatever this produces.

G. Leave the sahajatlas Pages project connected and serving sahajatlas.com. Change
nothing about it, including its variables.

H. Read Cloudflare's own name for a Workers build check run off the first build — and
whether Workers Builds posts one to GitHub at all. This is #266's
finding 1, still unmeasured. Record also whether the name identifies which Worker built:
.github/workflows/production-smoke.yml:40 tells the app's Pages build from the playground's by
the name alone, so a name carrying no Worker identity would let a design deploy fire the atlas
production lane once child 4 rewrites that filter. Write the answer into
#266 as well as here.

Interfaces

Consumes from #279 — three of five arrived, in #294:

  • ✅ The public/_headers CORS rule, and the single-matching-rule invariant that keeps it from
    serving *, * — public/_headers:43-47 and :61-63, held before a deploy by
    scripts/deploy-headers.test.ts.
  • ✅ The _redirects-versus-not_found_handling behaviour. Settled from the pinned wrangler's
    own source, not off a live Worker: the Worker never reads the file. See Approach 3.
  • ✅ The previews-block key, the wrangler devDependency (4.150.0), and that
    compatibility_date is required with no main.
  • ❌ Cloudflare's name for a Workers build check run, and whether one is posted to GitHub at
    all. Never measured. This ticket produces it (attended H).
  • ❌ Whether a Worker may take the name of a Pages project that still exists. Never measured.
    This ticket produces it
    (Approach 1, attended B).
  • ❌ The branch_excludes recipe. Never produced. This ticket derives it (attended F).

Provides

  • The app Worker child 4 uploads previews to and reads its own previews against.
  • The Worker child 5 points sahajatlas.com at.
  • Both variable sets, read back against a written list — the evidence child 5's cutover rests
    on.
  • The count of this repo's 17 live-site smoke cases that fail against the Worker host, and which
    ones.
  • The three findings above that chore(build): move the Ladle playground to Cloudflare Workers #279 left unmeasured, which children 2, 4
    and 5 were planned against.

Phases

  1. Repo-side, one PR: wrangler.jsonc, the check:wrangler extension, and the doc sweep.
    Pushable and reviewable on its own — it changes no live site, because no Worker exists yet and
    public/_redirects is untouched.
  2. Attended Cloudflare work, in the order A → H above. A run stops after phase 1 and hands
    this list back.

Acceptance criteria

Repo-side

  • wrangler.jsonc exists: no main, assets.directory = dist,
    assets.not_found_handling = "single-page-application", preview_urls: true, a
    compatibility_date, and a previews block.
  • The Worker is named sahajatlas, or sahajatlas-app with Cloudflare's refusal recorded in
    this ticket.
  • The worker-name label-segment constraint is written into this ticket for child 4: a match
    must anchor on -<worker>.<subdomain>.workers.dev, because sahajatlas is a prefix of
    sahajatlas-design.
  • pnpm check:wrangler dry-runs wrangler.jsonc as well as wrangler.design.jsonc, and
    was watched fail with the app config's assets.directory pointed at a directory
    pnpm build does not produce.
  • AGENTS.md:139-147 and docs/testing.md:13 describe the gate as covering both configs,
    including that the app's half needs dist/.
  • public/_redirects is byte-identical to main.
  • public/_headers is unchanged by this PR.
  • docs/environment.md's VITE_MAPBOX_ACCESSTOKEN row names Cloudflare as well as
    .env.local.
  • AGENTS.md, docs/architecture.md, README.md, docs/environment.md and
    scripts/assert-no-sourcemaps.mjs describe the app as building both to Pages (serving
    sahajatlas.com) and to a Worker, and AGENTS.md:291-294 no longer claims the app has no
    wrangler config. README.md and docs/architecture.md stay pointers.
  • No ⚠ line, #NNN breadcrumb or cross-repo pointer was deleted by the sweep.
  • No file under .claude/ was written.

The Worker serves the real app

  • The Worker's own workers.dev host renders the world list keyless — no ?key=, and
    not the configuration-error screen. That is what proves VITE_SAHAJCLOUD_API_KEY landed on
    the production trigger.
  • The map draws on that host: tiles render rather than an empty canvas, which is what proves
    VITE_MAPBOX_ACCESSTOKEN landed.
  • /search opens directly in a fresh tab and still shows the search page after a refresh.
  • A made-up path such as /this-does-not-exist serves the atlas shell, not a "not found"
    page. On the Worker this comes from assets.not_found_handling, not from
    public/_redirects.
  • PREVIEW_URL=https://<worker host> pnpm test:smoke passes, and every case that does not
    pass is named in this ticket with the reason
    . The lane is 17 cases from 13
    declarations
    across six files in tests/smoke/ — count it rather than trusting the
    figure, since .each makes the two differ. docs/testing.md's first invariant is that a
    green check means the specs ran, so a self-skip is a failure here.
  • tests/smoke/robots.smoke.test.ts:44-52 is recorded as passing or failing on the Worker
    host, with the x-robots-tag read for / and /search quoted. Approach 3 predicts it
    passes; the prediction is not the evidence.
  • tests/smoke/boot-origins.smoke.test.ts passes against that host. It asserts the
    presence of both ${VITE_SAHAJCLOUD_URL}/api and the VITE_SENTRY_DSN ingest host in
    the eager graph (:150-153 fails when a pattern finds nothing), so it is the only
    automated proof the production variable set really landed.
  • /auto.js and /embed.js come back from that host with
    Cache-Control: public, max-age=0, must-revalidate, Access-Control-Allow-Origin: * and
    X-Robots-Tag: noindex — public/_headers:26-30 and :61-63, the three settings
    Our Cloudflare Pages sites move to Cloudflare Workers, at no extra cost #266 promises partner sites keep.
  • Both files come back as JavaScript, not as the SPA shell. Content type, not status.
  • The first production build log shows the source-map upload with no ✗ sentry: line, and
    pnpm assert:maps passing. Both are quoted in this ticket.
  • A second push is built and served by the Worker. Our Cloudflare Pages sites move to Cloudflare Workers, at no extra cost #266 makes this
    part of "verified working" on purpose: a first upload proves nothing about whether the
    settings were entered correctly for every later build.

The variables

The findings #279 left unmeasured

  • Cloudflare's name for a Workers build check run, and whether one is posted to GitHub at
    all
    , and whether the name identifies which Worker built — written into this ticket
    and into Our Cloudflare Pages sites move to Cloudflare Workers, at no extra cost #266.
  • Whether a Worker may take the name of a still-existing Pages project.
  • The branch_excludes trigger configuration, recorded as it ends up.

Nothing else moved

  • sahajatlas.com still resolves to the Pages project throughout, and no Pages variable or
    setting was changed.
  • No workflow under .github/workflows/ was edited.
  • A merge-queue push starts no Worker build, confirmed by looking.

Verification checklist

Repo-side — runnable cold

  • pnpm install && pnpm lint && pnpm typecheck && pnpm test:run && pnpm build — all green.
  • node -e "JSON.parse(require('fs').readFileSync('wrangler.jsonc','utf8').replace(/^\s*\/\/.*$/gm,''))" parses, and the object has no main key.
  • pnpm ladle:build && pnpm check:wrangler — exits 0, and its output names both configs.
  • Point wrangler.jsonc's assets.directory at a directory pnpm build does not produce,
    re-run pnpm check:wrangler, and watch it exit 1 naming the field. Restore.
  • git diff --stat origin/main -- public/_redirects public/_headers prints nothing.
  • git diff --name-only origin/main | grep -E '^\.github/|^\.claude/' prints nothing.
  • grep -n 'VITE_MAPBOX_ACCESSTOKEN' docs/environment.md — the row names Cloudflare.
  • git diff origin/main -- '*.md' 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.

Against the live Worker — a person runs these

  • Open https://<worker host>/ in a browser with no ?key=: the world list renders and map
    tiles draw. Not the configuration-error screen, not an empty canvas.
  • Open https://<worker host>/search in a fresh tab, then refresh: the search page both
    times.
  • Open https://<worker host>/this-does-not-exist: the atlas shell, not a "not found" page.
  • curl -sI https://<worker host>/embed.js | grep -iE 'content-type|cache-control|access-control-allow-origin|x-robots-tag'
    — JavaScript, max-age=0, must-revalidate, *, noindex. Repeat for /auto.js.
  • curl -sI https://<worker host>/robots.txt | grep -i content-type returns text/plain,
    not text/html. Approach 3 says the Worker cannot shadow it; this is the check.
  • curl -sI https://<worker host>/search | grep -i x-robots-tag and the same for / —
    record both. Approach 3 predicts noindex on each.
  • PREVIEW_URL=https://<worker host> pnpm test:smoke — record the pass count out of 17 and
    name every failure. tests/smoke/_helpers/preview.ts:9 is where that variable is read.
  • PREVIEW_URL=https://<worker host> pnpm vitest run --config vitest.smoke.config.ts tests/smoke/boot-origins.smoke.test.ts
    passes on its own.
  • Read the first production build log: the Node and pnpm versions, the sentry: upload
    lines, and assert:maps. Paste all three into this ticket.
  • List the check runs on the commit that Worker built, and record each one's name and app
    slug. That is attended H, and it decides whether child 4 has a trigger at all.
  • Open both Builds triggers in the dashboard and read every variable name and value back.
    Compare line by line with the pre-move list.
  • Push a second commit to the production branch, wait for the build, then re-run
    curl -sI https://<worker host>/embed.js and confirm the new build is served.
  • curl -sI https://sahajatlas.com/embed.js | grep -iE 'cache-control|access-control-allow-origin'
    — unchanged from before this ticket. The Pages app must be untouched.
  • dig +short sahajatlas.com — still the Pages project.
  • Push to a gh-readonly-queue/*-shaped branch and confirm no Worker build starts.

Notes

  • chore(build): move the Ladle playground to Cloudflare Workers #279 is closed, and its attended phase did not run. Its repo-side PR
    (chore(build): move the Ladle playground to Cloudflare Workers #294) merged at 2026-10-13 15:36Z and the ticket was closed two seconds
    later; its own PR body lists the whole Cloudflare phase as outstanding, no comment on it
    records any of it, and docs/testing.md:217-224 still marks the playground measurement as
    owed. Read 2026-10-13 15:41Z: design.sahajatlas.com, sahajatlas-design.pages.dev,
    sahajatlas.com and sahajatlas.pages.dev all four answer with the Cloudflare Pages
    header signature (content-type: text/html; charset=utf-8 plus referrer-policy and
    x-content-type-options, none of which Workers static assets add), so the design Worker does
    not exist yet and the sahajatlas-design Pages project has not been deleted. Consequence for
    this ticket: the three ❌ items under ## Interfaces are its own, and its attended phase
    creates the first Worker in this account. The repo-side PR needs none of them.
    ⚠ One read is unexplained: the first GET of design.sahajatlas.com that day returned
    content-type: text/html with no charset and neither Pages header, while every later GET and
    HEAD of the same URL returned the full Pages signature. Recorded, not explained.
  • .claude/workflow.json:25 reads
    "deployTarget": "Cloudflare Pages (sahajatlas, sahajatlas-design)" and goes further stale
    here — chore(build): move the Ladle playground to Cloudflare Workers #294 could not correct it either, for the same reason. It is a
    protected path, no cloud run can write it, and a run that tries waits out its lease having
    written nothing. It is an attended edit at child 5, and deliberately not an acceptance
    criterion here. ⚠ The same attended edit is owed securityReview.triggerPattern
    (.claude/workflow.json:14), which matches no wrangler* path, so the file deciding what the
    Worker serves and which headers reach a host page escapes the security review that
    vite.config.ts and package.json already fire. One attended edit settles both configs.
    ci(preview): move the Ladle site to Workers and fail on no preview WeMeditateWeb#184 records the same finding for its own copy.
  • The production smoke lane keeps working through this ticket, and keeps reading Pages.
    .github/workflows/production-smoke.yml:40 fires only on
    check_run.name == 'Cloudflare Pages: sahajatlas', pinned by scripts/ci-workflows.test.ts:40
    deriving that slug from ci.yml:111's CF_PROJECT. The Worker's own check run carries a
    different name — if it carries one at all, which attended H is what settles — so it cannot fire
    the lane and cannot silence it either. Coverage of sahajatlas.com is unchanged. Child 4
    re-triggers that lane; this ticket must not touch it.
  • No docs/embedding.md or CHANGELOG.md entry is owed. No host can observe anything this
    ticket does: the domain does not move, the Pages app is unchanged, and nothing embeds a
    workers.dev host. Child 5 owns the embed guide. ⚠ docs/embedding.md:947 is the row
    scripts/ci-workflows.test.ts:30 reads to learn which host production means — do not reshape
    it here.
  • Siblings, in build order: chore(build): move the Ladle playground to Cloudflare Workers #279 (the Sahaj Atlas library, repo side
    done), the We Meditate library move in sydevs/WeMeditateWeb, this ticket, then the atlas
    preview lane, then the sahajatlas.com cutover and the Pages deletions.
    Our Cloudflare Pages sites move to Cloudflare Workers, at no extra cost #266's Technical notes table carries the order. This ticket and the We
    Meditate library move are unblocked by each other and can run in parallel.
  • 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 edits to
    public/_redirects and docs/embedding.md. This ticket touches neither, so there is nothing
    to reconcile here; child 5 is where the two meet.
  • wrangler stays a dev-scope dependency (added by chore(build): move the Ladle playground to Cloudflare Workers #279 at 4.150.0),
    so the shared Dependency Review gate — which fails only on an added dependency with a high or
    critical runtime advisory — does not bear on this PR, which adds no dependency at all.

Activity

  1. added theissue type on Oct 11, 2026
  2. added
    proposal
    on Oct 11, 2026
  3. moved this from Revising to Proposed in SYDevelopers Technical Roadmapon Oct 11, 2026
  4. removed
    proposal
    on Oct 13, 2026
  5. moved this from Proposed to Approved in SYDevelopers Technical Roadmapon Oct 13, 2026
  6. sydevs-bot commented on Oct 13, 2026

    @sydevs-bot
    ContributorAuthor

    🤖 no session running

    recent dispatches
    • 15:51Z implement · attempt 1 · session · done
    • 15:51Z implement · attempt 1 · session
    • 15:37Z revise · attempt 1 · session · done
    • 15:37Z revise · attempt 1 · session

    Written by the sydevs dispatcher. Sessions never edit this comment.

  7. added
    bot:working
    on Oct 13, 2026
  8. sydevs-bot commented on Oct 13, 2026

    @sydevs-bot
    ContributorAuthor

    Unblocked: #279 closed, and its PR #294 merged the public/_headers CORS rule, wrangler 4.150.0 and the settled previews key. The repo-side PR needs nothing more.

    Rechecked against main at 308666f. Body changes:

    • Approach 3 rewritten. A Workers static-assets Worker never reads _redirects; its fallback is assets.not_found_handling. Both outcomes this ticket predicted are void, and robots.smoke.test.ts:44-52 is now expected to pass.
    • New Approach 2. pnpm check:wrangler names wrangler.design.jsonc alone, so wrangler.jsonc would ship ungated. Extended, with a criterion and a watched failure.
    • Sweep re-pointed to post-chore(build): move the Ladle playground to Cloudflare Workers #294 lines. AGENTS.md § Deployment is the one authority. The lane is 17 smoke cases, not 16.
    • Three findings chore(build): move the Ladle playground to Cloudflare Workers #279 never measured are this ticket's now: the Workers check-run name, the naming constraint, the branch_excludes recipe. Its attended phase did not run — all four Cloudflare hosts still answer with the Pages signature.

    🤖 Written by the sydevs autonomous loop — see what this is


    Generated by Claude Code

  9. added
    bot:working
    and removed
    bot:working
    on Oct 13, 2026
  10. sydevs-bot commented on Oct 13, 2026

    @sydevs-bot
    ContributorAuthor

    Repo-side phase done: #297 (draft). wrangler.jsonc, check:wrangler over both configs, a spec for it, the doc sweep. public/_redirects and public/_headers byte-identical to main; nothing under .github/ or .claude/.

    ⚠ Approach 3's premise is false. Wrangler reads _redirects and uploads it, by the same maybeGetFile pair that reads _headers — which is why _headers governs the playground. createAssetsIgnoreFunction only keeps both out of the asset manifest, so neither is served; #279 read that as "never read". .assetsignore cannot suppress it.

    So the splat is in play on the Worker, and this ticket's two predictions — robots.smoke.test.ts passing, no asset shadowed — are not evidence. The "deletion moves earlier" branch is not void.

    Escalated to #266.

    Attended phase gains a step before A: read /embed.js, /auto.js, /robots.txt and /assets/* off the Worker host first. The PR carries today's Pages baseline.

    🤖 Written by the sydevs autonomous loop — see what this is


    Generated by Claude Code

  11. removed
    bot:working
    on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    Medium

    Hold Until

    None yet

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions