Repository navigation
ci(smoke): publish and read our own atlas preview, not Cloudflare's - #299
Conversation
The `Smoke` job hunted GitHub for whatever Cloudflare Pages had published. Once the app serves from a Worker that hunt matches nothing and every same-repo pull request goes red, so the job now builds the app itself and publishes it with `cloudflare/wrangler-action`, pinned by SHA and to the `wrangler` version `package.json` pins. Nothing is scraped, derived from a branch name, or read from text this workflow did not produce. The job builds its own `dist/` because `wrangler preview` uploads from a local directory and the gate job's build is deliberately secret-free so a fork can run it. It builds with `pnpm build:worker`: a bare `pnpm build` leaves `dist/_redirects`, whose splat the Workers API rejects as an infinite loop and which fails the whole upload (#280, #295). `scripts/assert-preview-host.mjs` is what still asserts WHICH Worker the address belongs to. It anchors the whole worker-name label segment at both ends, reading the name off `wrangler.jsonc`, because `sahajatlas` is a prefix of `sahajatlas-design` and a bare substring, a domain suffix test or an unanchored regex all accept the playground's host. Its spec carries `get-cloudflare-preview-url.test.ts`'s three refusals in their Workers spelling, plus the playground, the Worker's own production host, and a label inserted before the account subdomain. Each was watched fail: the substring defect reddens three cases, the suffix defect one. A `username`/`password` clause in the first draft is gone. Reading `hostname` already refuses a credential form, so no assertion could reach it, and a condition no spec can fail is the vacuity trap `docs/testing.md` names. The report step keeps every invariant and collapses only the reason vocabulary. `pending`, `unreachable`, `absent` and `failed` described somebody else's build; ours either published or did not. A fork and a merge-queue entry stay stated skips at exit 0 — the queue would stall on a red required check — a same-repo pull request with no Cloudflare secret goes red naming the secret, and an unrecognised reason keeps the loud branch. All five branches and all four plan states were run under `bash -e`. `scripts/ci-workflows.test.ts` gains the couplings the publish step creates, each of which fails silently: the wrangler version against `package.json` and the action's 4.136.3 floor, both uses of the action pinned by SHA, the absence of the action's production-secret-writing `secrets:` input, the specs reading the immutable address rather than the branch-following one, `build:worker` rather than `build`, and the guard being called at all. Every one was watched red against its own defect. Its production-lane pin re-anchors on the app Worker's `name`, since `CF_PROJECT` carried it and goes with discovery. `scripts/_wrangler-config.mjs` is the one JSONC reader behind all three readers that anchor on that name, so a rename breaks them together. A `pull_request: closed` job deletes the preview. Wrangler has no `preview list`, so there can be no later sweep, and the delete needs `--skip-confirmation` because the command prompts otherwise and tolerates no absent preview of its own. `continue-on-error` covers a second close; the step summary says whether the preview is actually gone, so a leak nothing can sweep is at least not silent. Refs #282 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MZ4TLZehWMEjq4c7Vw1ghg
`finalize-pr` in sydevs/claude-workflow reads a preview address out of an `<a href>` whose own anchor text matches /branch\s+preview\s+url/i (`branch-preview-url.mjs`). On Pages, Cloudflare wrote that label. On Workers no vendor does, and once Cloudflare stops previewing the app Worker there is no vendor comment to read either — so the smoke job posts the anchors itself, after the host guard and before the specs, so a red smoke run still leaves the reviewer a link. The branch alias carries the label; the pinned alias carries none, because `commitAliasFrom` identifies it by shape and `projectFrom` recovers the Worker's name from the same eight-hex label. Piping the exact summary this step builds through `branch-preview-url.mjs` prints `sahajatlas` and the BRANCH alias, exit 0. Swapping which address carries the label makes it print the per-commit one instead — the defect `finalize-pr/SKILL.md` names, since a frozen alias has the reviewer opening a dead build two pushes later. `ci-workflows.test.ts` pins the label onto `preview-url`, and was watched red against that swap. `neutral`, not `success`: the check run carries links and gates nothing. `merge-gate.mjs` counts both as green, so it blocks no merge. Refs #282 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MZ4TLZehWMEjq4c7Vw1ghg
`scripts/get-cloudflare-preview-url.{mjs,test.ts}` are gone — 1,350 lines
that hunted GitHub for whatever Cloudflare Pages had published. The lane
publishes its own preview now, so the hunt has nothing to find. What the
script carried moves into `docs/testing.md` rather than being deleted with
it:
- The build-timing record, in full and in the past tense: 86 successful
`Cloudflare Pages: sahajatlas` check runs across `main` and PR heads #58
to #128 — p50 99s, p75 138s, p90 232s, p95 373s, max 453s — the queueing
cause of the slow tail, and the `sahajatlas-design` sibling's median 41
seconds' head start, which is why it was no use as a second source once
#279 deleted that project.
- The finding that a Cloudflare build's in-progress window IS observable
live and INVISIBLE to a retrospective query, which #132 was written on
the wrong side of.
- #135's observed staleness case, now under invariant three: the comment
naming `9326e3b` while the head was `56c6b0d`.
- The check-run naming collision #280 and #297 found, re-pointed at the one
thing that still depends on it — `production-smoke.yml`'s `==`.
Invariant three is restated rather than dropped. Its security half gets
stronger, and the restatement says why: nothing is scraped, so the
provenance ranking has no class of attack left to rank, and the middle
label of a Workers preview host is our own account subdomain rather than a
first-come-first-served one. The staleness risk is named in its new form —
the specs must read the pinned alias, because the branch-following one
would smoke-test a later push — and so is the label-segment anchor, as the
thing that refuses the playground.
The `preview_status` table becomes the six causes that can now occur. The
lesson under `failed` is kept explicitly: never send a reader to re-run a
job that will fail identically.
Every row of the ticket's citation table is swept, plus three the table did
not list and the grep found: `wrangler.jsonc` and `wrangler.design.jsonc`
both cited the deleted spec as the anchor's pin, and
`docs/environment.md`'s `VITE_SENTRY_DSN` row cited the deleted script —
that row now records that the preview's DSN is an Actions secret here, not
a Cloudflare Preview-environment variable. `scripts/_ci-output.mjs` stays,
since `check-bundle-size.mjs` imports it, with its docblock re-pointed.
No `⚠` line, `#NNN` breadcrumb or cross-repo pointer was dropped: compared
set-wise against `origin/main`, `docs/testing.md` loses no breadcrumb and
gains five `⚠` markers. The `X-Robots-Tag` unknown is recorded beside the
four assertions it would blunt, with the instruction to record rather than
weaken them.
`ci.yml`'s gate-step comment no longer calls `wrangler.design.jsonc` the
only config the gate reads, names `dist/` as well as `build/` among what
must exist first, and states that `pnpm build` runs twice on purpose —
deleting the first as a duplicate would fail the gate cold.
Refs #282
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MZ4TLZehWMEjq4c7Vw1ghg
`production-smoke.yml` fired on `Cloudflare Pages: sahajatlas`. Once the app serves from a Worker that run stops being the one that publishes production, and the lane would wait on a check run nobody posts again — silently, since a workflow that never fires raises nothing. #297 answered both of this section's unknowns off the design Worker's own builds: Workers Builds does post a check run, it is named `Workers Builds: <worker name>`, and one Cloudflare App posts both it and the Pages run — so `startsWith(app.slug, 'cloudflare')` holds unchanged and the `push`-trigger fallback this ticket once specified is void. ⚠ The comparison stays `==` on the whole name. `sahajatlas` is a prefix of `sahajatlas-design`, which deploys from this repo too, so `startsWith` or `contains` would let the playground fire the atlas's production lane — the same prefix hazard the preview host guard exists for, one layer up. The production-versus-preview pair, the bare `PREVIEW_URL` literal, the `SYDEVS_BOT_PAT` author, the `production-red` label and the smoke-step gate are all untouched. `ci-workflows.test.ts` now matches the whole check-run name against `Workers Builds: <wrangler.jsonc's name>`, so the integration prefix is part of the anchor rather than assumed. Watched red against all three defects: pointing at the playground, reverting the prefix to Pages, and relaxing `==` to `startsWith`. Refs #282 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MZ4TLZehWMEjq4c7Vw1ghg
Four review lenses over the whole branch. Applied:
- **`realpathSync('')` throws ENOENT**, so the main-module guard's `|| ''`
was false reassurance: a missing `argv[1]` would crash the import rather
than read as false. The guard now tests it first. Carried from the
deleted discovery script, which had the same line.
- **`label.length <= suffix.length` had an unreachable half.** After
`endsWith(suffix)` the length cannot be smaller, so it is `label ===
suffix` — which also states the intent, that the bare worker label is
production rather than a preview of it.
- **The guard demands every address, rather than filtering empties.** "Do
we have an address" now lives in one place: the specs step gates on
`reason` like its four siblings, and the workflow expression that used to
encode the same rule, and could only ever disagree with it, is gone.
- **`appWorkerName()` moved below the empty-argument check**, so a broken
config cannot pre-empt the clearer message.
- **The plan step's `publish` output was `reason == 'publish'` spelled
twice.** One value now, which also removes a trailing `&&` list a reader
had to prove safe under `set -e`. Re-ran all four states under `bash -e`.
- **`PACKAGE` and `ROOT` were parsed twice** in two specs in one directory,
each with its own hand-written type. `readPackage()` and `ROOT` join
`_wrangler-config.mjs`, whose docblock now says why `package.json` sits
beside the configs.
- **`atLeast` was eight lines of unreachable generality** for one
constant-floor check: `localeCompare(…, { numeric: true })` does it, and
the ⚠ naming the `4.9.0` trap stays. Verified against six version pairs,
including that a plain compare reads `4.9.0` as newer than `4.136.3`.
- **The import-shape regex went**, keeping `toContain('appWorkerName()')`.
It only added the imported-but-unused case, which lint already rejects,
while reddening legal rewrites such as an aliased import.
- **`ci.slice(indexOf(…))` could vacuum**: `-1` leaves one character, and
every negative assertion below passes against it. It throws at collection
now, the same rule as `match()`.
- **The merge-queue and fork paths paid for a checkout and a full install**
for a job that then skipped everything. The plan step runs first and the
setup steps are gated on it. A queue entry is one per merge.
- **A closed pull request's `refs/pull/<n>/merge` stops being served**, so
the teardown's default checkout could fail on the one event that can ever
delete the preview. It checks out the base commit, which is also the
right copy of `wrangler.jsonc`.
Two new cross-file pins, each watched red against the defect it names: the
teardown deletes the preview the publish created, by the same `--name` and
the same `--config` as `APP_CONFIG` — a mismatch leaks a preview no sweep
can reach, since wrangler has no `preview list`; and the report step handles
every reason the plan step emits, makes only `fork` and `queue` quiet, and
keeps the loud fallback.
Declined, with reasons:
- **"Set but unusable ⇒ throw" in `tests/smoke/_helpers/preview.ts`.** A
non-empty bad value already fails loudly, and the empty case must stay a
skip: `production-smoke.yml` and a `-design` run both set hosts the guard
refuses by design, so the loudness belongs to the job. `docs/testing.md`'s
first invariant says so.
- **Moving the report step into `scripts/`.** It must run without a
checkout, which is now gated — and gating the checkout is what makes a
queue entry free. The vocabulary pin above closes the gap a spec would.
- **`build:preview` (`vite build` without `tsc`/`assert:css`).** Measurably
cheaper, and it contradicts an explicit acceptance criterion naming
`pnpm build:worker`. Noted for the reviewer rather than decided here.
- **A shared `isMain()` in `_ci-output.mjs`.** It would edit
`assert-no-sourcemaps.mjs`, which this PR does not otherwise touch.
Refs #282
Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01MZ4TLZehWMEjq4c7Vw1ghg
The preview's build-time values moved from Cloudflare's Preview environment into this repository's Actions secrets, because the job that builds the preview is ours now. `docs/environment.md` is the variable reference, so it gains the five and says which failure each one prevents — two of them (`VITE_SENTRY_DSN`, `VITE_SAHAJCLOUD_API_KEY`) are not optional for a preview, and the file already recorded why. ⚠ Until all five exist every same-repo pull request fails its `Smoke` check, naming the missing pair. Stated there, because the alternative is a green check that read nothing. It also corrects a claim the change made false: `SENTRY_AUTH_TOKEN` was "the only secret in this repo read by a build rather than run by hand". It is now only the only one a DEPLOY build reads. `AGENTS.md`'s CI-gate bullet described a missing Cloudflare preview being annotated and then failed; it now describes the two states that skip quietly and says every other route to no preview fails the job, plus the teardown being the only chance to delete a preview. No `docs/embedding.md` or `CHANGELOG.md` entry is owed: nothing a host can observe changes. No `src/` or `public/` file is touched, the domain does not move, and the preview's Sentry origin is already covered by the `connect-src` row #123 widened. Refs #282 Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01MZ4TLZehWMEjq4c7Vw1ghg
|
🤖 no session running recent dispatchesWritten by the sydevs dispatcher. Sessions never edit this comment. |
|
The plan step read A cloud session cannot add an Actions secret. I pushed nothing. On 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
sahajatlas-design | 2f5ad81 | Oct 16 2026, 05:23 PM |
|
This draft has had no CI activity for hours and no session holds it. A mention ( 🤖 sydevs dispatcher |
`wrangler preview` (open beta, through 4.151.0) uploads an assets-only Worker with a placeholder `no-op-worker.js`. The platform then serves the SPA fallback to browser navigations only, so `/search` returned 404 to the smoke specs' fetch while production served the shell. `versions upload --preview-alias pr-<n>` routes like `wrangler deploy` and deploys nothing. The action exposes only the version URL for an upload, so the guard reads the alias off wrangler's stdout. Aliases cannot be deleted (Cloudflare keeps the 1,000 most recent), so preview-teardown.yml goes, along with the `deployments: write` grant only the preview path used. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying sahajatlas with
|
| Latest commit: |
2f5ad81
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://2e482d05.sahajatlas.pages.dev |
| Branch Preview URL: | https://claude-ci-282-own-preview.sahajatlas.pages.dev |
|
The session for this item did not finish after 3 attempts. I have stopped retrying. A mention ( 🤖 sydevs dispatcher |
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
Net −726 lines, 1,350 deleted rather than ported: the shape the ticket asked for. The guard keeps the one property that survives the move, anchored on wrangler.jsonc's own name, and _wrangler-config.mjs earns its place at three readers.
But the body describes a different PR. HEAD is 35d35ed ci(smoke): publish with versions upload, not wrangler preview; the body still documents wrangler preview. It names .github/workflows/preview-teardown.yml, absent from the branch, reads two outputs nothing reads, and offers four "watched it fail" rows for code the diff has not got. The reviewer reads the body first.
That change also voided §7 in silence: the close-time delete is gone, with no line on whether an alias needs deleting. Wrangler has no preview list, so one nobody deletes is unreachable forever.
Findings
blocker— the body documents the pre-35d35edimplementation, down to a workflow file that does not exist.should-fix— §7's teardown dropped, with no statement of why or whether an alias needs one.should-fix—ci.yml:134: the plan step gates on two of the five secrets the build needs.should-fix—ci.yml:279: nothing showsdeployment-urlis the version's address, not the alias's.consider—ci.yml:229:command-outputand wrangler's stdout label carry the lane, unverified.
What was checked
#282 whole against the diff. Read on the branch: all 344 lines of ci.yml, assert-preview-host.mjs and its spec, _wrangler-config.mjs, ci-workflows.test.ts, both wrangler configs, production-smoke.yml, boot-origins.smoke.test.ts. git ls-tree shows no preview-teardown.yml. The production lane keeps == and its head_branch/head_sha pair. The guard spec carries §2's four refusals plus the playground host. No preview to open; the body says why, correctly.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The plan step read only the Cloudflare pair. With those entered and the three VITE_* secrets missing, a same-repo run reached `publish`, uploaded successfully, and then failed boot-origins.smoke.test.ts on an origin vite had inlined as empty — a missing secret arriving as a spec failure that blames the deploy, with the report step silent because the specs did run. The two lists are now pinned to each other: ci-workflows.test.ts compares what the plan step gates on against what the build step reads, so neither can move alone. Watched fail against the two-secret gate. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Roix3cGDiKX6EXqnXYicKf
The guard's two unpinned strings — the action's `command-output` output and wrangler's `Version Preview Alias URL:` line — and the claim that `deployment-url` is the version's address rather than the alias's were each stated without a source. Record where each was read, so the next reader checks the two pins rather than re-deriving them. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01Roix3cGDiKX6EXqnXYicKf
|
Addressed the review. Head Adopted
Rebutted, from source
🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Two specs conflicted, both because `main` and this branch extracted the same repo-file reads into different shared modules. `scripts/wrangler-config.test.ts` and `scripts/ci-workflows.test.ts` now use both: `readRepoSource`/`REPO_ROOT` (#302) for a plain repo file, and `_wrangler-config.mjs` for the wrangler configs and `package.json`, which is what couples the three readers anchoring on the app Worker's `name`. `_wrangler-config.mjs` is a `scripts/**/*.mjs`, so #302's new `no-restricted-syntax` ban reaches it. It resolves its root with `dirname(fileURLToPath(import.meta.url))`, the form that rule's own message prescribes for a `.mjs` that cannot import the `.ts` reader. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01E6KEQ2k7bKMVvHhvDa8Wg2
|
Merged
One change neither side's conflict showed. Lean gate green on the merge: 145 files, 1,733 tests, 59s. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Summary
Smokejob builds the app and publishes its own Workers preview withwrangler versions upload, then reads the address its publish step returned — so the 1,350-line Pages-discovery subsystem is deleted rather than ported, and no same-repo PR goes red when the app's host stops matching it.production-smoke.ymlfires on the Workers build instead of the Pages one, andci-workflows.test.tsre-anchors on the app Worker'snamenow thatCF_PROJECTis gone.Change outline
The smoke job's shape. Every step is gated on one
reason, so the states that cannot publish pay for no setup at all — amerge_groupentry is one per merge, and it has nothing to install for.⚠
versions upload, notwrangler preview— changed at35d35ed, after the preview path was measured on this PR. For an assets-only Worker,preview(open beta, through 4.151.0) uploads a placeholderno-op-worker.js, so the platform serves the SPA fallback to browser navigations alone andfetch('/search')came back 404 while production served the shell.versions uploadsends the shapewrangler deploydoes, and deploys nothing.docs/testing.mdcarries the measurement.The host question the deleted ranking used to answer. Nothing is scraped any more, so provenance is structural; what survives is which Worker, and both ends of the label are anchored.
Responsibilities, not edits.
Preview
Preview pending, and it will stay pending on this PR. The address this lane reads is one its own
Smokejob publishes, and that job cannot publish without the Actions secrets below — so there is no atlas preview to link until they exist. Nothing in this PR changes a rendered page: nosrc/orpublic/file is touched.Once the secrets land, a reviewer gets two links from the job itself, in the
Atlas previewcheck run and in the step summary:Branch Preview URL→pr-<n>-sahajatlas.contact-c66.workers.dev— follows the preview across pushes<first 8 of the version id>-sahajatlas.contact-c66.workers.dev— what the specs actually readPhases
All four repo-side phases are pushed, each with its review done. Phase 5 of the ticket is attended and is deliberately not a box here — it is work no cloud session can perform, and an unticked box would have the dispatcher start another implement session for it. It is in
## Manual verificationinstead.ci-workflows.test.tsre-anchorTest results
Measured on
4b5bc72, the current head.pnpm lint && pnpm typecheck && pnpm test:run— 142 files, 1,717 tests, 77sci-workflows), and the new secret-gate assertion was watched fail against the two-secret gate before it passed35d35ed: ✓pnpm build+pnpm size(standalone 309.1/318, loader 2.8/3.5, embed 310.9/318 KiB),pnpm ladle:build✓,pnpm check:wrangler✓ both configs. ⚠ Not re-run on4b5bc72, whose only changes are.github/,docs/andscripts/*.test.ts— CI's gate job covers it.pnpm build:worker && ls dist/_redirects→ absent; afterpnpm build→ presentEvery new assertion was watched fail against its own defect
docs/testing.mdasks for this, and several of the specs below passed before they could fail.secrets:inputpnpm builddeployment-urlwranglerVersionoffpackage.json's pinBranch Preview URLlabelsahajatlas-designCloudflare Pages:==tostartsWith*)fallbackno-credentialsmade a quiet skipShell is not reachable from a spec, so the two shell steps were run directly under GitHub's own
bash -e: the plan step over all four states (each exits 0, each reason correct), and the report step over all five branches (forkandqueueexit 0 with a::warning::;no-credentials,publishand an unrecognised reason exit 1 with a::error::).The two addresses were read off the two pins, not off a README, since the whole lane rests on them not swapping.
ci.yml's guard-step comment carries the citation:953926a2:action.ymldeclarescommand-output("comes from stdout"), andhandleVersionsUploadOutputEntrysetsdeployment-urlfrom the output file'spreview_url, reading no other field. For aversions uploadit sets nopreview-*output at all — those belong towrangler preview.4.150.0:versionsUploadwrites thatpreview_urlasversionPreviewUrl,https://<first 8 of the version id><suffix>, and puts the alias inpreview_alias_url, which the action never reads. The alias reaches us only as theVersion Preview Alias URL:line the guard parses, logged throughlogger.log→console.log→ stdout.Manual verification
The attended list this run hands back. No cloud session can do any of it.
docs/environment.md→ "GitHub Actions secrets"):CLOUDFLARE_API_TOKENandCLOUDFLARE_ACCOUNT_ID, the Cloudflare pair scoped to Workers only, plusVITE_SENTRY_DSN,VITE_SAHAJCLOUD_API_KEYandVITE_MAPBOX_ACCESSTOKEN. TheSmokecheck stays red until all five exist, and the plan step now gates on every one, so a half-entered set cannot publish. Then re-run it.Creating new Worker "sahajatlas"line. That is the first live test of the provisioning path this PR rests on — at4.150.0,provisionParentWorkerconfirms{ defaultValue: true, fallbackValue: true }under "Default to true so CI and Workers Builds can create Previews unattended." ⚠ That was read againstrunPreview;versions uploadis expected to reach the same provisioning, and nothing has yet run either./search): it must serve the shell, which is the defect35d35edmoved offwrangler previewfor.X-Robots-Tagfinding.curl -sI <preview>/searchandcurl -sI <preview>/this-does-not-exist: does the Workers preview host addnoindexof its own accord? If it does, threerobots.smoke.test.tscases andcache-headers.smoke.test.ts'sembed.jscase can no longer tell ourpublic/_headersrule from a platform default.docs/testing.mdsays to record it and not weaken the specs; Preview checks build on GitHub Actions SahajCloud#903's success list owns the repair.wrangler.design.jsoncand confirm the guard refuses it rather than smoke-testing the playground. Restore both.## Notes for reviewer. After a few merged PRs, list the Worker's preview aliases in the dashboard and confirm eachpr-<n>is still addressable and the set is growing as expected. ⚠ chore(build): move the Ladle playground to Cloudflare Workers #279's finding 2 —wrangler preview deleteon an assets-only Worker — is therefore still unmeasured, and this PR no longer measures it.POST/PATCH /accounts/{id}/builds/triggers. ⚠ Thebranch_excludesrecipe cannot exist — docs(deploy): record the design Worker's first build and smoke measurement #296 measured the API refusing prefix wildcards (12002). Choose abranch_includesof the production branch literal only, or remove the app Worker's preview trigger; keep the production trigger, and record which shape was used and why. Then confirm by looking that a branch push starts no build for the app Worker and a merge to the production branch still does.if:while asahajatlas-designdeploy does not. Only the-designpair has been observed.Production Smokerun that started on its own within an hour of the merge and read the host it says it read. If it never appeared, that is a failure, not a pass.Notes for reviewer
wrangler preview deleteonpull_request: [closed], which only exists for thewrangler previewpath35d35edabandoned. Aversions upload --preview-aliashas no delete command: Cloudflare keeps a Worker's 1,000 most recent aliases and drops the oldest, so an alias ages out rather than being torn down, and nothing is left unreachable to tooling..github/workflows/preview-teardown.ymland thedeployments: writegrant only the preview path used both went with it, in35d35ed.docs/testing.mdrecords the retention. The ticket's ownHygiene and scopecriterion — "a closed pull request's preview is deleted" — cannot be met and should be read as void, not unticked.deployment-urlis the stablepreview-urland "not a third address", and tells the specs to readpreview-deployment-url. That holds forwrangler preview. Forversions uploadthe action sets onlydeployment-url, from the version's own URL — so the specs read it, and the branch alias comes off stdout. The criterion "the specs readpreview-deployment-url" is satisfied in substance: they read the pinned, immutable address, which is what it was protecting.ci-workflows.test.ts's re-anchor is phase 4 in the ticket, but phase 1 deletes theCF_PROJECTvalue it read — so it had to land in phase 1 to keep each phase green. Phase 4 then only repoints the integration prefix.wrangler-config.test.ts'sreadConfig, but that helper was private to a spec, and importing a spec from a spec is worse than a shared module. It becamescripts/_wrangler-config.mjs, which all three readers now use — so a Worker rename breaks them together.securityReview.triggerPatternmatches nothing in this diff, so no security review ran. ⚠ That is itself a gap: the pattern (.claude/workflow.json) covers no.github/workflows/path, and this PR adds a workflow handling five secrets and a Cloudflare token. The ticket's## Notesalready owes that file an attended edit forwrangler*;.github/workflows/belongs in the same edit. In its place I read the credential surface by hand: each secret's presence reachesif:as a boolean and never as the secret; no${{ }}of attacker-controlled text enters anyrun:block (the PR number and head SHA are the only interpolations, both passed throughenvandjq --arg); the workflow ispull_request, neverpull_request_target, so a fork run gets no secrets at all; the Cloudflare credential is an action input and is absent from the build step's environment; and wrangler's stdout reaches the guard throughenv, so a hostile line in it cannot reach the shell as syntax.tests/smoke/_helpers/preview.ts— a non-empty bad value already fails loudly, and the empty case must stay a skip becauseproduction-smoke.ymland a-designrun both set hosts the guard refuses by design; moving the report step intoscripts/— it must run without a checkout, and gating the checkout is what makes a queue entry free; a sharedisMain()in_ci-output.mjs— it would editassert-no-sourcemaps.mjs, untouched here.pnpm build:worker, i.e.tsc && vite build && assert:css && assert:maps, and the gate job already provedtsc,assert:cssand (with no token, vacuously)assert:mapson the same SHA. Abuild:previewofvite buildalone would save one full TypeScript program per publishing run. I did not take it: the acceptance criteria namepnpm build:workerexplicitly, andwrangler-config.test.tspins the config↔script pairing a third script would sidestep. Worth a follow-up if the minutes matter.Atlas previewcheck run isneutral, whichmerge-gate.mjscounts as green alongsidesuccess, so it gates nothing.finalize-pr/SKILL.mdtells a run to gather "each Cloudflare check run'soutput.summary". The anchor-carrying check run is ours, so that prose wants one line widening insydevs/claude-workflow.branch-preview-url.mjsitself needs no change —PREVIEW_HOSTalready acceptsworkers.dev, and piping this step's exact summary through it printssahajatlasand the branch alias, exit 0.Detail
What moved into
docs/testing.mdrather than being deleted with the script. The 86-build timing record in full and in the past tense (p50 99s · p75 138s · p90 232s · p95 373s · max 453s, acrossmainand PR heads #58–#128), the queueing cause of the slow tail, thesahajatlas-designsibling's median 41-second head start, the finding that a Cloudflare build's in-progress window is observable live and invisible to a retrospective query, #135's observed staleness case, and the check-run naming collision — re-pointed at the one thing that still depends on it,production-smoke.yml's==.Compared set-wise against
origin/main,docs/testing.mdloses no#NNNbreadcrumb and gains five⚠markers. Three reference sites the ticket's citation table did not list turned up in the grep and were swept too: both wrangler configs cited the deleted spec as their anchor's pin, anddocs/environment.md'sVITE_SENTRY_DSNrow cited the deleted script.Why the guard dropped a clause. The first draft also refused
parsed.username || parsed.password. No assertion could reach it: readinghostnamealready refuses a credential form, so the clause could never fail and was the vacuity trapdocs/testing.mdnames. The test for the credential form stays; the comment now says what actually refuses it.Rejected:
actions/upload-artifactbetween the jobs. It would need theVITE_*secrets on the gate's build, which ends that build's fork-runnability and puts three keys in a PR-run artifact anyone with repo read access can download. It would also change whatpnpm sizemeasures — the budget is calibrated against the uncredentialed loader — and forceneeds: gate, turning the lane's wall clock frommax(gate, smoke)intogate + download + publish.Closes #282
🤖 Generated with Claude Code
https://claude.ai/code/session_01MZ4TLZehWMEjq4c7Vw1ghg