Skip to content

v2.9211 — The check a new build passes before it goes live is one tested script (punch list #480, step 2) - #10695

Merged
realrobertdouglas merged 2 commits into
mainfrom
claude/480-step2-built-page-script
Dec 2, 2026
Merged

realrobertdouglas merged 2 commits into
mainfrom
claude/480-step2-built-page-script

Conversation

@realrobertdouglas

Copy link
Copy Markdown
Contributor

Punch list #480, step 2 of 6. A workflow, a script and its test. No screen changes, nothing owed on prod.

Why

deploy.yml's Verify build output step was shell written into the workflow. It ran only on a push to main and nothing tested it. On 2026-12-02 its last rule refused a built page whose comment named the source file, and every deploy of main failed for almost two hours.

What changes

  • scripts/lib/builtPage.mjs holds the rules as data: .nojekyll, index.html and 404.html at the top of the built folder, a built asset named in the page, and no main.tsx named in it. builtPageRefusals answers every rule a page breaks, where the shell stopped at the first.
  • scripts/check-built-page.mjs [folder] (npm run check:built-page) reads a built folder, prints its top and its index.html as the step always did, and exits 1 with one line a refusal.
  • deploy.yml's step is now node scripts/check-built-page.mjs dist, where it sat. The words of each refusal are the shell's own. Nothing else in the deploy changes.

Proof

  • src/lib/builtPage.test.ts, 15 tests: each refusal on a made-up page, the comment of 2026-12-02, the script's exit on made-up folders, and that deploy.yml runs the script after the build and keeps no copy of the rules.
  • By hand in the worktree: a vite build, the script green on its dist (the old shell's rules pass on the same folder), red with the source file's name put in a comment, and two lines for two refusals.
  • This changes the deploy's own step. The first deploy.yml run on main after the merge is the proof on a runner, and this thread reads it.

Steps 3 to 6 follow, one PR each. The card's own lines wait for #10666 (step 1's numbers) to land, since both would write the one file.

🤖 Generated with Claude Code

realrobertdouglas and others added 2 commits December 2, 2026 14:04
…ted script (punch list #480, step 2)

deploy.yml's "Verify build output" step was shell in the workflow: it ran only after a merge and nothing
tested it. On 2026-12-02 its last rule refused a page whose comment named the source file, and every
deploy of main failed for two hours.

- scripts/lib/builtPage.mjs: the rules as data, and builtPageRefusals answers every rule a page breaks
- scripts/check-built-page.mjs [folder]: reads a built folder, prints its top and its page, exits 1 on a refusal
- deploy.yml's step runs the script, where it sat; the words of each refusal are the shell's own
- src/lib/builtPage.test.ts: each refusal, the script's exit, and that deploy.yml keeps no copy of the rules

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…ives (scripts/lib/builtPage.mjs)

It pinned the deploy's grep line in deploy.yml, which step 2 moved into the script.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@realrobertdouglas
realrobertdouglas added this pull request to the merge queue Dec 2, 2026
Merged via the queue into main with commit 809bd64 Dec 2, 2026
6 checks passed
@realrobertdouglas
realrobertdouglas deleted the claude/480-step2-built-page-script branch December 2, 2026 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant