ci: make the verify job actually run verify - #133
Merged
Conversation
The CI job here is named "verify" and did not call `npm run verify`. It re-inlined the chain by hand, and the hand-written copy had drifted: package.json verify: format:check → lint → test → build ci.yml: format:check → lint → test → build (--if-present ×3) Neither ran a typecheck. `tsc --noEmit` existed nowhere in this repo, so type errors were caught only as a side effect of `next build` — late, slow, and one `typescript.ignoreBuildErrors` away from not being caught at all. Two fixes, both the same principle: 1. Add a real `typecheck` script and put it in `verify`, before test/build so it fails in seconds rather than after a full Next build. Verified: `tsc --noEmit` is already clean (exit 0), so this gate goes green on arrival — it is closing a hole, not papering over a backlog. 2. CI now calls `npm run verify` verbatim, and the `--if-present` flags are gone. Those flags made three gates unable to fail: rename or delete the `lint` script and the step passes green instead of erroring. A gate that cannot go red is not a gate. That is exactly the defect that let evig report "Run Tests ✓" on every PR for three weeks while 25 assertions were failing (fixed in evig#306), and the same reason dotfiles#14 now sweeps the fleet for discarded gates. Full `npm run verify` passes locally: format, lint, typecheck, test, build, exit 0. Green verify locally now genuinely means green CI, because they are the same command. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The bug
This repo's CI job is named
verifyand did not callnpm run verify. It re-inlined the chain by hand, and the hand-written copy had drifted:package.jsonverify.github/workflows/ci.yml--if-present--if-present--if-presentNeither ran a typecheck.
tsc --noEmitexisted nowhere in this repo, so type errors were caught only as a side effect ofnext build— late, slow, and onetypescript.ignoreBuildErrorsaway from not being caught at all.Two fixes, one principle
1. A real
typecheckgate. Added"typecheck": "tsc --noEmit"and put it inverifybefore test and build, so it fails in seconds rather than after a full Next build. Verified it is already clean (exit 0) — this closes a hole, it does not paper over a backlog.2. CI calls
verifyverbatim, and--if-presentis gone. Those flags made three of the four gates unable to fail: rename or delete thelintscript and the step passes green instead of erroring.A gate that cannot go red is not a gate. That is the same defect that let evig report "Run Tests ✓" on every PR for three weeks while 25 assertions were failing (evig#306), and the reason dotfiles#14 now sweeps the fleet for discarded gates. This repo had the quieter variant: not a swallowed result, but a hand-copied gate list that silently lost an entry.
Verification
Full
npm run verifylocally: format → lint → typecheck → test → build, exit 0. "Green verify locally ⇒ green CI" is now true here by construction, because they are the same command.🤖 Generated with Claude Code