From c5777aa4d7469f06707c1b1917c6bd09ae260d91 Mon Sep 17 00:00:00 2001 From: dtzp555 Date: Sat, 23 May 2026 15:50:27 +1000 Subject: [PATCH] fix(ci): correct bootstrap-tolerance gate in test.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The bootstrap commit's test.yml had an incorrect skip condition. The intent was "if no test-features.mjs, skip" โ€” but the actual logic was "skip only if no test-features.mjs AND no npm test script in package.json." Since package.json declares `scripts.test`, the second check returned true and the gate never fired; `npm test` ran and failed with `Cannot find module test-features.mjs` (verified at GitHub Actions run 26324988738 on the bootstrap commit). Fix: drop the second clause. The file's presence is the only correct gate โ€” the npm script is always present in package.json from day one, so checking it adds no information. Comment makes the bootstrap-vs- Phase-1 lifecycle explicit so future readers don't reintroduce the two-clause guard. Co-Authored-By: Claude Opus 4.7 --- .github/workflows/test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ac44d0..2a4db16 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,8 +46,12 @@ jobs: - name: Run npm test shell: bash run: | - if [ ! -f test-features.mjs ] && ! node -e "process.exit(require('./package.json').scripts && require('./package.json').scripts.test ? 0 : 1)" 2>/dev/null; then - echo "::notice::No test-features.mjs or npm test script yet (bootstrap phase). Skipping." + # Bootstrap tolerance: if test-features.mjs does not exist yet (Phase 0 + # ships before Phase 1 lands the test harness), skip with a notice. + # The `npm test` script is configured in package.json from day one, so + # checking script presence is not a useful gate โ€” the file must exist. + if [ ! -f test-features.mjs ]; then + echo "::notice::test-features.mjs not present yet (Phase 0 bootstrap phase). Skipping. Test harness lands with Phase 1 per docs/adr/0001 / spec ยง6." exit 0 fi npm test