From 3461fa2ce28178d8b3a8ca0f69dd8da9dcdfc9e1 Mon Sep 17 00:00:00 2001 From: Jakob Heuser Date: Tue, 20 Oct 2026 12:57:16 -0700 Subject: [PATCH] fix(ci): build the CLI before the upgrade workflows' consistency check The cli vitest project's globalSetup snapshots dist/ and throws when it is missing, so since 2026-10-01 every Vale and ast-grep upgrade run that found a new version failed before selecting a test and proposed no pull request. --- .github/workflows/ast-grep-upgrade.yml | 18 ++++++++++++++---- .github/workflows/vale-upgrade.yml | 18 ++++++++++++++---- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ast-grep-upgrade.yml b/.github/workflows/ast-grep-upgrade.yml index b685f312..19553b9b 100644 --- a/.github/workflows/ast-grep-upgrade.yml +++ b/.github/workflows/ast-grep-upgrade.yml @@ -151,11 +151,21 @@ jobs: if: steps.detect.outputs.update == 'true' run: pnpm --filter @taskless/cli generate:ast-grep-schema + # The test itself imports source, but the `cli` vitest project it runs in + # does not: its globalSetup (test/support/distribution-snapshot.ts) + # snapshots `dist/` for every run and throws when there is none, before + # selecting a single test file. That setup landed 2026-10-01 and every + # run that found an update failed here from then on, proposing nothing, + # because this job had never needed to build. Built after the + # regeneration above so the bundle carries the new schema. + - name: Build the CLI + if: steps.detect.outputs.update == 'true' + run: pnpm --filter @taskless/cli build + # The consistency check Validate would run, before anything is pushed. It - # imports source directly and needs no build: it holds the constant to - # the pins and spawns the pinned binary to confirm it reports that - # version. A failure here is a bookkeeping defect in this job's own - # output, so the run fails and proposes nothing. + # holds the constant to the pins and spawns the pinned binary to confirm + # it reports that version. A failure here is a bookkeeping defect in this + # job's own output, so the run fails and proposes nothing. # # Deliberately ONLY that test. ast-grep-vendor-contract.test.ts holds the # language list and a set of measured behaviours to the binary, and a new diff --git a/.github/workflows/vale-upgrade.yml b/.github/workflows/vale-upgrade.yml index 9683d9cd..92bfb305 100644 --- a/.github/workflows/vale-upgrade.yml +++ b/.github/workflows/vale-upgrade.yml @@ -206,11 +206,21 @@ jobs: if: steps.detect.outputs.update == 'true' run: pnpm --filter @taskless/cli generate:vale-schema + # The test itself imports source, but the `cli` vitest project it runs in + # does not: its globalSetup (test/support/distribution-snapshot.ts) + # snapshots `dist/` for every run and throws when there is none, before + # selecting a single test file. That setup landed 2026-10-01 and every + # run that found an update failed here from then on, proposing nothing, + # because this job had never needed to build. Built after the + # regeneration above so the bundle carries the new vocabulary. + - name: Build the CLI + if: steps.detect.outputs.update == 'true' + run: pnpm --filter @taskless/cli build + # The consistency check Validate would run, before anything is pushed. It - # imports source directly and needs no build: it holds the constant to - # the pins and spawns the pinned binary to confirm it reports that - # version. A failure here is a bookkeeping defect in this job's own - # output, so the run fails and proposes nothing. + # holds the constant to the pins and spawns the pinned binary to confirm + # it reports that version. A failure here is a bookkeeping defect in this + # job's own output, so the run fails and proposes nothing. # # Deliberately ONLY that test. vale-schema-contract.test.ts and # vale-vendor-contract.test.ts hold a recorded corpus of what the binary