Repository navigation
fix(build): drop _redirects from the Ladle build the design Worker deploys - #295
Merged
Merged
Conversation
…ploys Workers static assets read `_redirects` after all, and the Workers API rejects `/* /index.html 200` as an infinite loop (code 100324), so the first `wrangler deploy` of `sahajatlas-design` failed outright. The Worker already gets the SPA fallback from `not_found_handling`, so `ladle:build` now deletes the file from `build/`. `check:wrangler` could not see it: the check runs server-side, past the dry run. Corrects the docs that said the Worker ignores the file. #279. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Deploying sahajatlas with
|
| Latest commit: |
5978d99
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://a60201c1.sahajatlas.pages.dev |
| Branch Preview URL: | https://fix-ladle-worker-redirects.sahajatlas.pages.dev |
Deploying sahajatlas-design with
|
| Latest commit: |
5978d99
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8611aacf.sahajatlas-design.pages.dev |
| Branch Preview URL: | https://fix-ladle-worker-redirects.sahajatlas-design.pages.dev |
This was referenced Oct 13, 2026
Ardnived
added a commit
that referenced
this pull request
Oct 13, 2026
…ement (#296) Measured during #279's attended phase: - The Workers build image honoured .node-version and packageManager (nodejs 22.17.0, pnpm 9.15.0), so AGENTS.md's "unverified" goes. - Workers Builds branch rules refuse prefix wildcards (12002), so gh-readonly-queue/* and mockup/* cannot be excluded as on Pages. - Smoke against design.sahajatlas.com on the Worker: 10 of 17 fail, replacing the owed re-run in docs/testing.md. - robots.txt no longer claims _redirects ships beside it; the Ladle build drops that file since #295. This also gives the Worker a second, observable production deploy for #266's gate. Co-authored-by: Claude Opus 5.5 <[email protected]>
sydevs-bot
pushed a commit
that referenced
this pull request
Oct 14, 2026
`main` answered this branch's open question while it sat conflicted. #295 measured what I had only narrowed: a Worker reads `_redirects`, and the Workers API rejects `/* /index.html 200` as an infinite loop (100324), so the deploy fails outright rather than shadowing assets. #296 then measured the first build — the image honours `.node-version` and `packageManager`, and branch rules refuse prefix wildcards (12002). Conflicts, both in the half this branch and `main` each rewrote: - `package.json` — took `main`'s `ladle:build` with its `rm -f`, kept this branch's two-config `check:wrangler`. - `AGENTS.md` § Deployment — took `main`'s measured text wholesale and dropped my hedged version of the same facts, then added only what is the app's: that `dist/` cannot be cleaned by `pnpm build`. That last point is the one new thing here. `main` says the app's Worker move "must drop the line rather than ship it", and `ladle:build` shows the shape — but `dist/` is not `build/`: the Pages project serving sahajatlas.com deploys that same directory and needs the splat. So the deletion cannot live in `pnpm build`. `build:worker` is `build` plus the same `rm -f`, and it, not `build`, is the app Worker's Builds command. Verified: `pnpm build` leaves `dist/_redirects` in place, `pnpm build:worker` removes it. `check:wrangler` cannot catch a regression — the dry run never reaches the API that rejects the file — so the spec pins each config to the script that fills its directory, and pins `pnpm build` as free of the deletion. All three watched fail. Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01GWfwsqh3etS8AgAGQRFp5s
63 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Found while doing #279's attended phase. The first
wrangler deploy --config wrangler.design.jsoncfailed:#294 assumed the Worker ignores
_redirects. It doesn't: Workers static assets parse it, and the API rejects the Pages SPA rule/* /index.html 200. The Worker already gets that behaviour fromassets.not_found_handling, soladle:buildnow deletes the file frombuild/.dist/and the Pages app are untouched, andpublic/_redirects's rule is byte-identical (only its comment grew).check:wranglercan't catch this, because the validation is server-side, so the docs now say so.Verification
pnpm ladle:build→ nobuild/_redirects;_headersandrobots.txtstill there;pnpm check:wranglergreen.wrangler deployofbuild/without the file succeeded, andhttps://sahajatlas-design.contact-c66.workers.devserves/,/robots.txt, a deep link and a hashed asset with ACAO*,x-robots-tag: noindexand the expectedCache-Control.vitest run scripts— 99 passed.Refs #279
🤖 Generated with Claude Code