Skip to content

ci(build): run pnpm vp build - verify never did (#61) - #64

Merged
wormeyman merged 1 commit into
mainfrom
ci/build-job
Jul 30, 2026
Merged

ci(build): run pnpm vp build - verify never did (#61)#64
wormeyman merged 1 commit into
mainfrom
ci/build-job

Conversation

@wormeyman

Copy link
Copy Markdown
Collaborator

Closes #61.

pnpm run verify is vp check && pnpm run check:vue && vp test && pnpm run preview:test. None of those build. A change that passes all four and breaks the production build reaches main unnoticed until someone deploys - possibly days later, and it lands on whoever is deploying rather than whoever broke it. The whole argument for #54 was that a gate nobody runs until deploy time is not a gate.

A separate job, not a phase in verify

deploy already runs pnpm build immediately after pnpm run verify, so folding the build into verify would build twice on every deploy and slow the local gate people run by hand. As a separate job it also runs in parallel with the tests rather than after them, so wall-clock is unchanged.

This adds a second status check named build. It is advisory until added to ruleset EJ - see "follow-up" below.

The shallow checkout is correct, and I measured it

#61 was filed - by me - believing the build stamp needed deeper history, and asked for fetch-depth to be chosen carefully. It does not need any. scripts/buildStamp.ts runs exactly three git commands:

git rev-parse HEAD
git rev-parse --short HEAD
git status --porcelain

None read history, so the default fetch-depth: 1 is sufficient. The workflow comment from #56 saying "the build stamp reads git history" was imprecise - it reads git state. That is now recorded in the job itself, because the next person will make the same assumption I did.

Noted in the job and deliberately not fixed: on a pull_request event, checkout lands on the merge commit, so the stamp this job produces is a synthetic SHA that exists nowhere in the repo. Harmless while CI never ships its artifact - deploy:app builds locally and uploads that. If a CI build ever becomes the thing that deploys, this needs revisiting.

Zero-warning enforcement deliberately NOT added

#61 floated it; both routes were checked and rejected, and the reasoning is in the job so it is not re-derived later:

  • Grep the output for /warn/i. vp build has no --fail-on-warn (verified against vp 0.2.6 --help). And this repo has already been burned grepping build output: a version-string grep returned zero because the minifier had rewritten the string into a numeric array, so a shipped fix looked missing. A false pass is worse than no check.
  • A build.rollupOptions.onLog hook that throws on warn. Sturdy, but it hard-fails every local build the first time a dependency emits one benign warning - and dependency-sourced warnings are precisely what has happened here (zlib-asm needed two suppressions before deps(codec): replace zlib-asm with pako at legacyHash:true (refutes #40) #46 removed it). The value CLAUDE.md describes is in reading a new warning, not blocking on it.

So warnings stay visible in this job's log and unenforced. If that changes, onLog is the route - not a grep.

Verification

Locally on this branch: vp check clean (316 formatted, 301 no warnings/lint/type errors), and pnpm vp build succeeds in 494ms with zero warnings, emitting index-*.js at 211.44 kB / 73.11 kB gzip. CI runs both jobs on this PR.

Follow-up, needs a ruleset edit rather than a file

build is not a required check yet, so a red build can still merge. Adding it to ruleset EJ is a repository setting, and doing it before this merges would block this very PR on a check that does not exist on main yet. Correct order: merge this, confirm build runs green on main, then add it to the ruleset. Happy to do that as the last step.

🤖 Generated with Claude Code

https://claude.ai/code/session_01F3a2HLJ4beKARi7SPmaM54

`verify` is check + type-check + tests; none of them build. So a change that
passed all three and broke the production build reached `main` unnoticed until
somebody deployed - possibly days later, and landing on whoever was deploying
rather than whoever broke it.

A separate job rather than a phase inside `verify`: `deploy` already runs
`pnpm build` straight after `pnpm run verify`, so folding it in would build twice
on every deploy and slow the local gate people run by hand. Separate also means
it runs in parallel with the tests.

**The default shallow checkout is correct, measured rather than assumed.** #61 was
filed believing the build stamp needed deeper history and wanted `fetch-depth`
chosen carefully. It does not: `scripts/buildStamp.ts` runs exactly `rev-parse
HEAD`, `rev-parse --short HEAD` and `status --porcelain`, none of which read
history. "The build stamp reads git history" was imprecise - it reads git *state*.
Recorded in the job, because the next person will assume the same thing.

Noted in the job and not fixed: on a `pull_request` event checkout lands on the
merge commit, so this job's stamp is a synthetic SHA existing nowhere in the repo.
Harmless while CI never ships its artifact - `deploy:app` builds locally and
uploads that.

Zero-warning enforcement is deliberately NOT added. `vp build` has no
`--fail-on-warn` (vp 0.2.6), grepping build output is the exact fragility that
already produced a false negative here once, and an `onLog` hook that throws
would hard-fail every local build the first time a dependency emits one benign
warning. Warnings stay visible in the log and unenforced; the reasoning is in the
job so it is not re-litigated from scratch.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F3a2HLJ4beKARi7SPmaM54
@wormeyman
wormeyman merged commit 7c553f1 into main Jul 30, 2026
2 checks passed
wormeyman added a commit that referenced this pull request Jul 30, 2026
Three stale claims, all reading as current fact after #64/#65 merged:

- verify.yml still listed `pnpm vp build` as deliberately absent, 90 lines
  above the job that runs it.
- Its concurrency comment still said strict_required_status_checks_policy
  is false; ruleset EJ has had strict: true since before #65 landed. The
  reason main runs stay uncancelled survives, so it is corrected in place.
- CLAUDE.md repeated the "build is absent" claim and the "build stamp reads
  git history" one that #64 measured wrong - it reads git *state*.

Adds what happened after: `build` is a required check now, the two-step
order for adding one (requiring a check that does not exist on main blocks
the PR that introduces it), that the ruleset PUT replaces the whole rules
array, and that strict: true means every other open PR needs Update branch
after any merge.


Claude-Session: https://claude.ai/code/session_01BkKb3S2cGyRFFHSzuCQBgj

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

CI does not run pnpm vp build - a build-only break reaches main and surfaces at deploy time

1 participant