From 7b42dc7bb1eeca55766f035a9f0ddd4e65bdca41 Mon Sep 17 00:00:00 2001 From: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com> Date: Sun, 16 Aug 2026 13:10:32 +0200 Subject: [PATCH] ci: call the verify SSOT instead of hand-copying it with --if-present MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI listed format:check, lint, test and build as four separate steps — the same four `npm run verify` already runs — and put `--if-present` on each of them. That combination is the 'gate that cannot go red' shape. `--if-present` turns a missing script into a PASS, so renaming or deleting any of those scripts would have left CI green while the check silently stopped running. And a hand-copied list drifts from `verify` the moment `verify` changes, which is how a repo ends up with a local gate and a CI gate that are two different things, only one of which blocks a merge. CI now runs `npm run verify` verbatim: one definition of verified, enforced identically on a laptop and on the branch. Found by dotfiles/scripts/ci/check-verify-contract.sh. Co-Authored-By: Claude Opus 5 --- .github/workflows/ci.yml | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98eb4eec..92b4c8a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,14 +29,11 @@ jobs: - run: npm ci - - name: Format check - run: npm run format:check --if-present - - - name: Lint - run: npm run lint --if-present - - - name: Test - run: npm run test --if-present - - - name: Build - run: npm run build + # SSOT: "verified" is defined ONCE, in package.json `verify` + # (= format:check + lint + test + build), and run identically here and + # locally. This used to hand-copy those four steps, which drifts the + # moment `verify` changes — and each carried `--if-present`, so renaming + # or deleting a script would have turned its gate into a silent pass. A + # gate that cannot go red is worse than no gate, because it is believed. + - name: Verify + run: npm run verify