Repository navigation
chore(build): move the Ladle playground to Cloudflare Workers - #294
Conversation
The `sahajatlas-design` Ladle playground moves off Cloudflare Pages onto Workers static assets. This is the repo side: the config the Worker builds from, and the Wrangler the build image will use. Assets-only (no `main`), `assets.directory` = `build`, `not_found_handling: "single-page-application"` to replace what `public/_redirects` does for the Pages app, and `preview_urls: true` because #266 refuses turning previews off. `previews: {}` is empty on purpose — a preview of this Worker diverges from production in nothing — but the block has to exist, since `cloudflare/wrangler-action` throws without one. The public Workers configuration page does not document the key at all, so it was confirmed two other ways: `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 bogus sibling key. That negative control is what makes the silence evidence. `compatibility_date` is required even with no `main`. The value is the one wrangler 4.150.0 suggests itself, so it tracks the pinned Wrangler rather than whoever edits next. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_0131ba7bGy2jNNVVPc1qDCB4
Cloudflare Pages adds `access-control-allow-origin: *` to every static asset by itself. Workers static assets add none — their only defaults are Content-Type, Cache-Control, ETag and CF-Cache-Status. So the design playground would have shipped with no CORS at all, and a self-hosted Raleway that silently fails to render is exactly #91. sydevs/SahajCloud#913 also depends on a library's assets staying readable cross-origin. Adding a second ACAO rule was not an option. Both platforms apply every matching rule and join a repeated header value with a comma, so a `/*` ACAO rule on top of the three existing ones would serve `Access-Control-Allow-Origin: *, *` on `/assets/*`, `/auto.js` and `/embed.js` — invalid, and #91 again by a different door. So the header moves rather than multiplying: the `/*` rule carries it, the three specific rules keep `Cache-Control` only, and the invariant is stated where someone about to add a fourth rule will read it. Exactly one ACAO rule matches any path. Nothing observable changes on `sahajatlas.com` — this pins a default Pages already serves. The two smoke specs that assert the header still assert the same value; their comments described the old file shape and now describe this one. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_0131ba7bGy2jNNVVPc1qDCB4
…ngler config Eleven places described two Cloudflare *Pages* projects, and several said outright that this repo carries no `wrangler` config. Both are now false. Rewritten in the past tense where they described the Pages project, and in the present where they describe the Worker: the AGENTS.md Deploy row and Deployment section, `docs/architecture.md`, `docs/environment.md`, `docs/mcp-setup.md`, `README.md`, `public/robots.txt`, `scripts/assert-no-sourcemaps.mjs` and the ci.yml `CF_PROJECT` comment. Four of those carry a fact rather than a rename: - The "both on the current Node 22 build image" claim is gone. `.node-version` pins 22.17.0 and the Pages image honours it; whether the Workers image reads the file is undocumented and its defaults are newer. The claim is replaced by a warning to read the first build log, not by a guess. - `scripts/get-cloudflare-preview-url.mjs` cites the sibling `sahajatlas-design` Pages check run as corroborating timing evidence. That run stops existing. Nothing breaks — it was never load-bearing alone and `runProject` just stops matching it — so the note says so rather than deleting the reasoning. - `docs/testing.md`'s non-vacuity measurement was taken against `sahajatlas-design.pages.dev`. The platform differs, so the old 10-of-16 cannot be carried across; the entry names the new negative control and says the number is owed. - `docs/mcp-setup.md` records that the published docs do not cover every wrangler key, with the two checks that settle one when they are silent. The three `sahajatlas-design.pages.dev` strings in `scripts/get-cloudflare-preview-url.test.ts` stay. They are pinned fixtures for the refused sibling and the hostname boundary — literals under test, not claims about live infrastructure. Every `⚠` line and `#NNN` breadcrumb was counted across the diff and survives; several gained one. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_0131ba7bGy2jNNVVPc1qDCB4
…fter The `_headers` restructure rested on a comment, and the comment named a mechanism that does not cover it. `cache-headers.smoke.test.ts` and `robots.smoke.test.ts` read ACAO on `/auto.js` and `/embed.js` only, they run post-deploy, they skip without a preview, and they read the Pages app — never the Worker, the one platform where a missing or invalid ACAO is fatal rather than cosmetic. A collision re-added to `/assets/*`, the likeliest edit because that rule used to carry the header, would have been caught by nothing. That is the #148 shape one layer up, and `cache-headers.smoke.test.ts:18` is where this repo already wrote the rule down: a comment stating an intention is not a mechanism. `scripts/deploy-headers.test.ts` is the mechanism. It parses `public/_headers` and asserts no two rules set the same header name on patterns that can match one path — generalised past ACAO, so the `Cache-Control` version of the same bug is covered too. Two guards keep it honest: it refuses a pattern shape the overlap check cannot decide rather than answering wrongly, and it pins the rules the file is known to carry so a reformat that breaks the parser fails instead of going green. Each of the four assertions was run against its own defect and watched fail: re-adding ACAO to `/assets/*` (both collision specs red, naming `*, *`), a mid-pattern wildcard (decidability guard red), and a file parsing to nothing (vacuity guard red). Also closes the hole the lift opened: #91's actual subject is the self-hosted Raleway woff2, which ships under `/assets/`. That rule carried CORS explicitly until this branch moved it, and no check had ever read CORS on a hashed asset. The smoke lane now discovers one from the deploy and asserts it. The ⚠ about matching the worker-name label segment moves to `get-cloudflare-preview-url.test.ts`, where whoever can violate it is already working — they have no reason to open the design Worker's config. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_0131ba7bGy2jNNVVPc1qDCB4
…f eleven The review pass found two more places stating the deploy topology, and both had become false rather than merely stale: - `src/styles/fonts.ts` carried the #91 rationale itself — "Cloudflare Pages does for static assets" — in the file explaining the font whose CORS requirement the `_headers` restructure exists to serve. One fact changed on one of two platforms, and the twelfth copy was missed while someone was looking for copies. - `docs/testing.md` and the AGENTS.md Deployment section both said all three `public/` files govern both sites. Workers executes `_headers` and `robots.txt` but NOT `_redirects`; the Worker's fallback is `assets.not_found_handling`, which this same branch documents elsewhere. `AGENTS.md` § Deployment is now the one place the topology is written down, and says so. `README.md` restated the whole split and then pointed at AGENTS.md; `docs/architecture.md` had grown into a near-copy of it. Both are pointers now, keeping only what a local reader needs — for architecture, the deep-link fallback, which genuinely differs per platform. `AGENTS.md`'s own table row and `docs/mcp-setup.md` defer the same way. That leaves one row to edit when the app follows to Workers instead of eleven, which is the drift this branch demonstrated twice. The `previews` verification method lives in `docs/mcp-setup.md` alone, which owns MCP guidance; the other two copies are pointers. Also de-narrated throughout. Comments and docs said "now", "went first", "left", "changes no observable behaviour" — readings that only make sense to someone holding the diff. `docs/rules/code-comments.md` forbids it: a comment must read correctly to someone who opens the file fresh. Trimmed on the same rule's razor, which applies to comments kept and not only to ones cut; the `wrangler.design.jsonc` header loses the restated `package.json` script body and the pinned version number, both drift-prone copies of values held elsewhere. `.gitignore` gains `.wrangler/`: the first local `wrangler dev` or `--dry-run` writes temp and simulated-state files there, and the state can reach tens of megabytes in a public repo. Every ⚠ line and #NNN breadcrumb was counted before and after; all survive, and several gained. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_0131ba7bGy2jNNVVPc1qDCB4
Deploying sahajatlas with
|
| Latest commit: |
14cd5b1
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://dbfbc8c5.sahajatlas.pages.dev |
| Branch Preview URL: | https://claude-chore-279-ladle-worke.sahajatlas.pages.dev |
Deploying sahajatlas-design with
|
| Latest commit: |
f08358f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a05d755c.sahajatlas-design.pages.dev |
| Branch Preview URL: | https://claude-chore-279-ladle-worke.sahajatlas-design.pages.dev |
Nothing in this repo read `wrangler.design.jsonc`. Workers Builds holds the dashboard's copy of the path, so a rename, a typo, or an `assets.directory` that drifts from what `ladle:build` writes would have surfaced only in a Cloudflare build log, on main. The pinned `wrangler` was dead weight at the same time — a devDependency no script invoked. One step in the existing gate job fixes both. It runs after `ladle:build` because the dry run fails when `assets.directory` does not exist, which is exactly the drift worth catching, and `build/` is what that step writes. Proven both ways before wiring: exit 0 against the real config with no credential in the environment, and exit 1 with `assets.directory` pointed at a directory Ladle does not produce, naming the field. `WRANGLER_SEND_METRICS` is off so a telemetry endpoint cannot make the gate flaky; `--dry-run` itself reaches no network and needs no token, which is what lets this run on a forked PR like the source-map dry run beside it. No `ci-workflows.test.ts` entry: that spec exists for CI facts that fail silently, and a red `run:` step in the gate job is not one. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_0131ba7bGy2jNNVVPc1qDCB4
sydevs-bot
left a comment
There was a problem hiding this comment.
🧐 Adversarial review
The four repo-side asks are all there, and the doc sweep is the strongest part: I walked every row of #279's closed inventory and each one is rewritten, with no ⚠ line or #NNN breadcrumb dropped. The _headers lift is correct, and the branch preview serves exactly * — never *, * — on /embed.js, /robots.txt and the hashed asset, both Cache-Control rules intact.
The question is size. One header edit arrives with three enforcement mechanisms the ticket did not ask for: a 119-line unit spec, a CI gate, and a smoke spec. check:wrangler plainly pays rent, since nothing else reads the config. The spec guards a four-rule file whose acceptance criterion was one grep -c.
The diff also falsifies two statements and leaves them standing, in files it edits.
Findings
- should-fix —
docs/testing.md:224still counts 16 smoke specs. This branch makes 17. - should-fix —
pnpm check:wrangleris a new CI gate named nowhere butci.yml.package.json:24. - consider —
scripts/deploy-headers.test.ts:31is machinery for a generality the file lacks. - consider —
wrangler.design.jsonc:30'spreviews: {}cites an Action this repo never runs.
What was checked
Read #279, the full diff bar the lockfile, then AGENTS.md, public/_headers, wrangler.design.jsonc, deploy-headers.test.ts and both smoke specs. Re-took the preview read: three curl -sI against the branch alias reproduced the body's table exactly. Derived the spec count from tests/smoke/ — 12 declarations, 16 cases after .each, 17 now. Grepped sahajatlas-design: every survivor is past tense, a pinned fixture, or .claude/workflow.json:25, correctly left attended. No CORS mention in docs/embedding.md or CHANGELOG.md, so "no entry owed" holds. cloudflare/wrangler-action has one hit, the comment claiming it.
🤖 Written by the sydevs autonomous loop — see what this is
Generated by Claude Code
The 17th case lands in this branch (`hashed assets are readable cross-origin`), and three statements of the denominator kept saying 16: `docs/testing.md`'s "these same 16 specs", its non-vacuity paragraph, and the body of the issue a red production run files — the line a person reads first. The 2026-10-06 measurement itself stays at 16, because that is what ran. Its denominator is now dated explicitly, and the current count sits beside it with the reason the two figures differ: `.each` means declarations and cases are not the same number, so the paragraph says to count rather than trust the figure. The #148 history at `:232`/`:234` is a dated measurement and stays as it is. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P13ArXByB1wN4ZvrJycXTM
The gate landed in `ci.yml` and `package.json` and nowhere a contributor reads: not the Essential commands list, which marks every other gate as one, not the sentence naming what CI gates PRs on, and not the numbered list that gives each gate its rationale. This PR makes `AGENTS.md` the authority for deploy topology, which makes the omission sharper. Its entry also carries the ordering constraint that only a `ci.yml` comment held: the dry run fails unless `build/` exists, so run cold it reads as a broken gate rather than a config check. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P13ArXByB1wN4ZvrJycXTM
`parseRules` recorded a line as a pattern only when it opened with `/`. Cloudflare also accepts a full URL (`https://sahajatlas.com/*`), and a dropped pattern is worse than an undecidable one: its indented headers were attributed to the rule ABOVE it, so the collision check read a file that is not the file while the decidability guard stayed green on a pattern it never saw. Both guards would have passed on a real collision. Any unindented line is a pattern now, and the decidability guard refuses the shapes `overlaps` cannot answer for — which is the guard doing its job rather than a fourth one being added. The regex it matches is one named constant, so the new spec asserts against the same definition. Watched fail first: with the old `startsWith('/')` the new spec goes red showing `cache-control` landed on `/*`, which is exactly the misattribution. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P13ArXByB1wN4ZvrJycXTM
…eds it The comment sent the next reader looking for a `cloudflare/wrangler-action` workflow: the Action is this branch's only mention of itself, and nothing here runs it. The block stays — #279 makes it an acceptance criterion, and child 4 is what introduces the consumer — but the comment now says it is pre-placed for that, with the cross-repo source of the requirement. Measured both ways with `wrangler deploy --dry-run`: silent with the block and without it, so no local failure is being prevented and the comment says so. `preview_urls` is recorded as not the default while the schema is open: `node_modules/wrangler/config-schema.json` gives `false`, so that line carries a value rather than restating one. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P13ArXByB1wN4ZvrJycXTM
`docs/testing.md:13` enumerates what CI gates on, in the same shape `AGENTS.md` does, and the new gate was missing from both. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01P13ArXByB1wN4ZvrJycXTM
|
All four review findings addressed in five commits — pushed
Lean gate green: 140 files, 1706 tests. 🤖 Written by the sydevs autonomous loop — see what this is Generated by Claude Code |
Summary
wranglerpinned, and CORS lifted to one site-wide rule because Workers supplies none.## Manual verification. No live site changes until a person creates the Worker.Change outline
Contract —
public/_headers, the rules both platforms executeThe playground would have shipped with no CORS at all. Pages adds
access-control-allow-origin: *to every static asset by itself; Workers static assets add none. A second ACAO rule was not an option: both platforms apply every matching rule and comma-join a repeated value, so adding/*beside the three existing rules serves the invalid*, *. So the header moves rather than multiplying.Nothing observable changes on
sahajatlas.com— this pins a default Pages already serves on every asset. On the playground it is the whole of CORS. Confirmed live on this branch's preview, under## Preview.Flow — what now checks the new config, and when
CI job `gate` pnpm lint → typecheck → test:run scripts/deploy-headers.test.ts # NEW: no two rules set one header name # on patterns that can match one path pnpm build → pnpm size pnpm ladle:build # writes build/ + pnpm check:wrangler # NEW: wrangler deploy --dry-run + fails on a missing assets.directory # the drift case; needs build/, hence the order + fails on an unparseable config # no credential, no network, metrics off CI job `smoke` (post-deploy, Pages app only) cache-headers.smoke.test.ts + CORS on a hashed /assets/ URL # NEW: #91's real subject, previously unassertedBefore this, nothing in the repo read
wrangler.design.jsoncat all — Workers Builds holds the dashboard's copy of the path — so a rename or a driftedassets.directorywould have surfaced only in a Cloudflare build log, on main. The pinnedwranglerwas dead weight at the same time; now it is load-bearing.Files — the doc topology, one authority instead of eleven
Then, after review (
## Review round 1below):Preview
⚠ This previews the Pages app, where the change is deliberately unobservable. There is no Worker to preview until the attended phase creates one. So rather than a link to go look at, here is the read, already taken against this branch's deploy — it is the whole of what a preview can prove for this diff:
Branch alias: https://claude-chore-279-ladle-worke.sahajatlas.pages.dev (200)
access-control-allow-origincache-controlx-robots-tag/embed.js*public, max-age=0, must-revalidatenoindex/assets/main-DmPpETVq.js*public, max-age=31536000, immutable/robots.txt*noindexExactly
*, never*, *, on all three. The twoCache-Controlrules the header used to share a block with are intact, so lifting CORS displaced neither (#148). The hashed asset is #91's own subject and the one this branch had left unasserted.To re-take it on a later push, substituting the current hashed asset name:
Data: none needed — these are header reads on static files.
Test results
pnpm lint && pnpm typecheck && pnpm test:run— 140 files, 1706 testsscripts/deploy-headers.test.ts5 passed, each watched fail against its own defect first (below)pnpm build, ✓pnpm size(standalone 309.1/318, loader 2.8/3.5, embed 310.9/318 KiB), ✓pnpm ladle:buildpnpm check:wrangler— reads 190 files frombuild/, no warnings, no credential presentThe build,
sizeandladle:buildfigures are from the first round: the review round touched only Markdown, a spec, and a JSONC comment, so the lean gate is what was re-run.Review round 1
The adversarial review raised four findings. Two adopted outright, two adopted in part with the rest rebutted on evidence — all four threads answered and resolved.
docs/testing.md:224counted 16 smoke specs; the lane is 17 — adopted (98e4f41).:168andproduction-smoke.yml:139said 16 too. The 2026-10-06 measurement keeps its own denominator, dated as the 16 that ran.check:wranglerwas documented nowhere butci.yml— adopted (aeb868d,14cd5b1).AGENTS.mdnames it in Essential commands, in the gate sentence, and as a fourth bullet in the numbered list;docs/testing.md:13lists the same gates.deploy-headers.test.tsis machinery for a generality the file lacks — part adopted (856acbc). The review found a real hole in passing:parseRulesrecorded a pattern only when the line opened with/, so a full-URL pattern (Cloudflare accepts one) had its headers attributed to the rule above it — the collision check reading a file that is not the file, while the decidability guard stayed green on a pattern it never saw. Every unindented line is a pattern now, and the guard refuses the shapesoverlapscannot answer for.overlapsitself stays:/*carries site-wide headers after this PR, soCache-Controladded there is the likely next edit and collides with all three existing rules — which an ACAO-only spec would not see.previews: {}cites an Action this repo never runs — part adopted (15cac5e). The block stays, because chore(build): move the Ladle playground to Cloudflare Workers #279 makes it an acceptance criterion and child 4 introduces the consumer; the comment now says it is pre-placed for that and names the cross-repo source. Measured both ways:wrangler deploy --dry-runis silent with the block and without it, so the comment no longer implies a local failure.preview_urls: trueis not the wrangler default — the schema givesfalse— so that line carries a value rather than restating one.Manual verification
Phase 1 (this PR) is the whole of what a cloud run can do. Everything below needs the Cloudflare dashboard, DNS, or the Builds trigger API. Order matters.
wrangler.design.jsonc, build commandpnpm ladle:build, outputbuild/. Read the first build log for the Node and pnpm it actually used and write them into Our Cloudflare Pages sites move to Cloudflare Workers, at no extra cost #266 —.node-versionpins22.17.0andpackage.jsonpins[email protected], but whether the Workers image honours.node-versionis undocumented and its defaults are newer.branch_excludes/path_includesthroughPOST/PATCH /accounts/{id}/builds/triggers— the dashboard cannot express either. Read today's watch paths off the Pages project before deleting it, mirror them, excludegh-readonly-queue/*.production-smoke.ymlis triggered bycheck_runand nothing else); whether an assets-only Worker preview can be created and then taken down withwrangler preview delete; whether a Worker route can sit in front of a live Pages CNAME._redirectssplat suppressesX-Robots-Tag: noindexon a rewritten deep link, and how many of the 17 smoke specs fail against the newdesign.sahajatlas.com— before deleting the Pages project. That number lands indocs/testing.md, which this PR marks as owed rather than guessing.Notes for reviewer
No
## Phaseschecklist, deliberately. The ticket describes two phases, but phase 2 is attended dashboard work. An unticked box would make the dispatcher fire another implement session for work no cloud run can perform. The repo side fits one session; the attended list is above.No
docs/embedding.mdorCHANGELOG.mdentry is owed. A host observes no change: the preview read above shows the files a host fetches carrying the same ACAO and the sameCache-Controlas before, and nothing embeds the playground. Worth a second opinion, since_headersis a host-facing file.Two things the ticket asked for that resolved differently, both settled by measurement rather than prose:
previewskey against the Workers configuration docs via the cloudflare-docs MCP. That MCP is not available to a routine session, and the published page does not document the key at all. Settled two other ways instead:node_modules/wrangler/config-schema.jsondefines it ("configuration intended solely for Previews"), andwrangler deploy --dry-runaccepts it in silence while warningUnexpected fields found in top-level fieldon a deliberately bogus sibling key. The negative control is what makes the silence evidence.wrangleris 4.150.0, not the 4.149.0 the ticket named; pinned to that.compatibility_dateturns out to be required even with nomain, and the value is the one wrangler 4.150.0 suggests itself.One inventory item added.
.github/workflows/ci.yml:111mentionssahajatlas-designand is not in the ticket's "closed list". Its comment distinguishedCF_PROJECTfrom the playground's Pages project, so it goes stale when that project is deleted.ci-workflows.test.ts:38matches the value with\S+, which stops before the comment, so editing it is safe.Dismissed findings, with reasons:
wranglerdevDependency and point$schemaat the hosted schema instead. It costs ~175 MB in the pnpm store (workerd 134 MB, wrangler 16 MB, miniflare 12 MB, a second esbuild 12 MB), paid by three CI install steps per run. Rejected: an acceptance criterion requires the devDependency, the attended phase needswrangler preview delete(floor 4.135.0), andcheck:wranglernow makes the local copy load-bearing rather than autocomplete-only. Recording the measurement so Our Cloudflare Pages sites move to Cloudflare Workers, at no extra cost #266 can revisit it..claude/workflow.json'sdeployTarget, a twelfth stale copy. Cannot: it is a protected path no cloud run can write, and the ticket makes it attended and explicitly not an acceptance criterion.logo.svgunused by the playground via.assetsignore. Measured and left alone: 88 KB of a 4.7 MB incremental deploy is not worth a second place where asset policy lives, and it would need not to apply todist/.AGENTS.md§ Deployment now says it owns the topology.Detail
Each new assertion was watched fail against its own defect, per
docs/testing.md's rule that a spec is not finished until it has failed:Access-Control-Allow-Origin: *re-added to/assets/*access-control-allow-origin on both /assets/* and /*/api/*/edgepattern added_headersreduced to a commentassets.directorypointed at a directory Ladle does not producepnpm check:wranglerexit 1, naming the fieldparseRulesback tostartsWith('/'), with a full-URL pattern in the fixturecache-controlattributed to/*— the misattribution itself, not just a missing entryWhy the overlap check generalises past ACAO. It compares every header name across every pair of patterns, so the
Cache-Controlversion of the same bug is covered too. That previously rested oncache-headers.smoke.test.ts'snot.toMatch(/,\s*public.*,\s*public/i)— a regex guessing one spelling of one collision.Security review ran (triggered by
package.jsonandsrc/styles/) and found nothing above its bar. The substantive surface is widening ACAO from three paths to all paths; it confers no new read because these hosts set no cookie, run no auth, serve nothing per-user, and are already fetchable by anyone server-side — and*is structurally incompatible withAccess-Control-Allow-Credentials, which nothing here sets. The latersrc/styles/fonts.tsedit is comment-only, proven withcomment-fingerprint.mjsrather than re-run.One policy change worth knowing, since it is the only thing the widening really alters: cross-origin readable is now the default for any future file landing in
public/,dist/orbuild/, instead of requiring opt-in into/assets/*. Fine for a build output whose every byte is public — but it is the line to re-read if a non-public artifact is ever emitted into either output._headersand_redirectsare never served as assets on the Worker — verified in the pinned wrangler's own code (createAssetsIgnoreFunctionseeds its ignore list with both before reading any.assetsignore), not assumed from docs. The Worker also ignores_redirectsentirely; its fallback isassets.not_found_handling. Two docs claimed otherwise and are corrected here.Fixture pre-mortem for
deploy-headers.test.ts. It reads the realpublic/_headersrather than a fixture, so there is no invented world to drift. Its one assumption is the pattern grammar — a literal path or a trailing*. Review round 1 closed the gap under that assumption: the parser records every unindented line, so a shape it cannot decide reaches the decidability guard and is refused, rather than being dropped and having its headers attributed to the rule above. The one hand-written fixture is the two-rule string that spec parses; the collision and CORS specs still read the file under test.Closes #279
🤖 Written by the sydevs autonomous loop — see what this is
🤖 Generated with Claude Code
https://claude.ai/code/session_0131ba7bGy2jNNVVPc1qDCB4