From 9c0ad9cb0968a16e70f2a5cab26d4e835bfce405 Mon Sep 17 00:00:00 2001 From: Charan Jagwani Date: Fri, 24 Apr 2026 15:07:22 -0700 Subject: [PATCH] ci: gate every PR on tsc-cli regardless of touched paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prevents the class of regression that required #2458. The prek tsc-cli hook had files: ^(bin|scripts)/, so a PR touching only test/ or src/ skipped the check entirely. That let #2130 (test-only) land without typecheck, then #2422 tightened strict: true and the latent errors surfaced for every downstream PR — six open PRs were stuck on the same cluster by the time it was noticed. Two changes, belt-and-suspenders: - New explicit Typecheck CLI + tests (strict) step in basic-checks action. Runs npm run typecheck:cli unconditionally. Independent of how anyone configures prek, so future hook-filter drift can't hide a tsc error from CI. - Widen the prek tsc-cli hook's files: to match what tsconfig.cli.json actually covers (bin/, scripts/, src/, test/, tsconfig.*.json). Local pre-push now gates the same class of change that CI does. Zero runtime impact. Co-Authored-By: Claude Opus 4.7 (1M context) Signed-off-by: Charan Jagwani --- .github/actions/basic-checks/action.yaml | 8 ++++++++ .pre-commit-config.yaml | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/actions/basic-checks/action.yaml b/.github/actions/basic-checks/action.yaml index df509fd7ef2..4d2102a96e8 100644 --- a/.github/actions/basic-checks/action.yaml +++ b/.github/actions/basic-checks/action.yaml @@ -38,6 +38,14 @@ runs: shell: bash run: npm run build:cli + - name: Typecheck CLI + tests (strict) + # Explicit gate independent of the prek tsc-cli hook's file-pattern filter. + # The hook's `files:` scope excludes test/ and src/, which let #2130 + + # #2422 interact to ship a strict-mode regression onto main silently. + # Running this unconditionally here catches that class of drift. + shell: bash + run: npm run typecheck:cli + - name: Validate config schemas shell: bash run: npm run validate:configs diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 85dee71761d..7c0cc333932 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -239,7 +239,10 @@ repos: entry: npx tsc -p tsconfig.cli.json language: system pass_filenames: false - files: ^(bin|scripts)/ + # Match what tsconfig.cli.json actually typechecks — previously ^(bin|scripts)/ + # missed test-only and src-only PRs, which allowed a strict-mode regression + # (#2130 × #2422) to land on main silently. + files: ^(bin/|scripts/|src/|test/|tsconfig.*\.json$) types_or: [ts, tsx] stages: [pre-push] priority: 10