@@ -30,13 +30,16 @@ concurrency:
3030 cancel-in-progress : true
3131
3232jobs :
33+ # Lint, typecheck, and package verification share one checkout and install. The lint gates
34+ # and typecheck are independent reads of the tree, so they run as one parallel group.
35+ #
3336 # The Swift trailing-comma assertion is text-only and runs before the toolchain setup, so a
3437 # grep failure does not wait on an install. The DI-seams check below needs a real TypeScript
3538 # runtime (#1976 / PR #2006), so it runs after Setup toolchain instead.
36- lint :
37- name : Lint & Format
39+ lint-typecheck-package :
40+ name : Lint, Typecheck & Package
3841 runs-on : ubuntu-latest
39- timeout-minutes : 10
42+ timeout-minutes : 20
4043 steps :
4144 - name : Checkout
4245 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -69,51 +72,97 @@ jobs:
6972 - name : Setup toolchain
7073 uses : ./.github/actions/setup-node-pnpm
7174
72- # Same false-green shape as the Swift check above (#1976). An earlier revision of this
73- # gate (PR #2006, first review pass) fixed the exit-code handling but kept the ban/allow
74- # decision as a regex that exempted matches by the *spelling* of the typeof target
75- # (`typeof fetch` always passed, SCREAMING_SNAKE_CASE targets always passed) — a name-based
76- # semantic allowlist that would silently pass a new, genuinely test-only `typeof fetch` seam
77- # anywhere in the tree while banning an equally legitimate seam under any other name.
78- # scripts/di-seams instead checks each match against an explicit, typed, per-site allowlist
79- # (scripts/di-seams/approved.ts) keyed by (file, field, typeof-target): a triple is exempt
80- # only because it was individually reviewed and named, never because of how it is spelled.
81- # The gate fails just as hard on a stale approval (one whose triple no longer matches
82- # anything) as on an unapproved seam, so the allowlist can't drift out of sync with the code
83- # it describes. See scripts/di-seams/model.ts and its tests.
84- - name : Fail if test-only DI seams reappear in production code
85- uses : ./.github/actions/run-gate
86- with : { gate: di-seams }
75+ - parallel :
76+ # Same false-green shape as the Swift check above (#1976). An earlier revision of this
77+ # gate (PR #2006, first review pass) fixed the exit-code handling but kept the ban/allow
78+ # decision as a regex that exempted matches by the *spelling* of the typeof target
79+ # (`typeof fetch` always passed, SCREAMING_SNAKE_CASE targets always passed) — a name-based
80+ # semantic allowlist that would silently pass a new, genuinely test-only `typeof fetch` seam
81+ # anywhere in the tree while banning an equally legitimate seam under any other name.
82+ # scripts/di-seams instead checks each match against an explicit, typed, per-site allowlist
83+ # (scripts/di-seams/approved.ts) keyed by (file, field, typeof-target): a triple is exempt
84+ # only because it was individually reviewed and named, never because of how it is spelled.
85+ # The gate fails just as hard on a stale approval (one whose triple no longer matches
86+ # anything) as on an unapproved seam, so the allowlist can't drift out of sync with the code
87+ # it describes. See scripts/di-seams/model.ts and its tests.
88+ - name : Fail if test-only DI seams reappear in production code
89+ uses : ./.github/actions/run-gate
90+ with : { gate: di-seams }
91+
92+ - name : Run oxlint
93+ uses : ./.github/actions/run-gate
94+ with : { gate: lint }
95+
96+ - name : Check formatting
97+ uses : ./.github/actions/run-gate
98+ with : { gate: format }
99+
100+ - name : Run typecheck
101+ uses : ./.github/actions/run-gate
102+ with : { gate: typecheck }
87103
88- - name : Run oxlint
104+ - name : Build CLI
89105 uses : ./.github/actions/run-gate
90- with : { gate: lint }
106+ with : { gate: build }
91107
92- - name : Check formatting
108+ - name : Verify emitted chunk ownership
93109 uses : ./.github/actions/run-gate
94- with : { gate: format }
110+ with : { gate: bundle-owner-files }
111+
112+ # The build runs on the default toolchain Node and the package is verified on the minimum
113+ # supported Node, so this job covers what a user on `engines.node` floor actually installs.
114+ - name : Setup Node.js 22.12
115+ uses : actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
116+ with :
117+ node-version : ' 22.12'
95118
96- # Structural guards share one checkout and install. Every gate stays an
97- # independently named step with its own failure message; the gate manifest
98- # derives lane ownership from these declarations, so merging jobs changes
99- # nothing it asserts.
119+ # Packs, lints the tarball with publint/attw, installs it outside the workspace, and imports
120+ # every published entry point before running the CLI. See scripts/check-package.ts.
121+ #
122+ # Runs the script directly rather than through `pnpm check:package`: the repo's pinned pnpm
123+ # requires Node >= 22.13 and refuses to start on the 22.12 floor this job exists to cover. The
124+ # gate itself only needs `node` and `npm`, so it is the package.json script minus the launcher.
125+ - name : Verify the published package on Node.js 22.12
126+ run : node --experimental-strip-types scripts/check-package.ts
127+
128+ # Structural guards and the history-backed compatibility gates share one deep checkout and
129+ # install. Every gate stays an independently named step with its own failure message; the gate
130+ # manifest derives lane ownership from these declarations, so merging jobs changes nothing it
131+ # asserts.
100132 repo-guards :
101- name : Repo Guards
133+ name : Repo Guards & Compatibility
102134 runs-on : ubuntu-latest
103- timeout-minutes : 15
135+ timeout-minutes : 20
104136 steps :
105137 # The layering ratchets (R6/R9/R10) measure the merge-base with origin/main, which a
106- # shallow checkout cannot reach.
138+ # shallow checkout cannot reach. Fallow, replay-compat, and daemon-wire-compat need full
139+ # history or tags.
107140 - name : Checkout
108141 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
109142 with :
110143 fetch-depth : 0
144+ fetch-tags : true
111145
112146 # The layering gate parses production sources with `oxc-parser`, so
113147 # dependencies are required; keep install-deps enabled.
114148 - name : Setup toolchain
115149 uses : ./.github/actions/setup-node-pnpm
116150
151+ # The fallow audit runs in the background beside the guards below. A cold fallow run costs
152+ # several minutes on a hosted runner: since fallow 3.20 every import re-walks the root
153+ # tsconfig's project references.
154+ - name : Run Fallow audit
155+ id : fallow-audit
156+ background : true
157+ env :
158+ FALLOW_BASE : ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
159+ uses : ./.github/actions/run-gate
160+ with :
161+ gate : fallow
162+ args : |
163+ --base
164+ ${{ env.FALLOW_BASE }}
165+
117166 - name : Check import-direction DAG
118167 # Structured import-direction lint over the resolved graph. See
119168 # scripts/layering/check.ts and CONTEXT.md (Architecture: folder DAG +
@@ -186,43 +235,6 @@ jobs:
186235 uses : ./.github/actions/run-gate
187236 with : { gate: mcp-metadata }
188237
189- # Slowest guard (~3 min), so it runs last and structural failures surface
190- # before it. Runs on plain Node via the shared install above.
191- - name : Check numeric ranges
192- uses : ./.github/actions/run-gate
193- with : { gate: freerange }
194-
195- # History-backed compatibility gates share one deep checkout: fallow,
196- # replay-compat, and daemon-wire-compat all need either full history or tags,
197- # which no shallow unit lane can read.
198- compat-provenance :
199- name : Compatibility & Provenance
200- runs-on : ubuntu-latest
201- timeout-minutes : 15
202- steps :
203- - name : Checkout
204- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
205- with :
206- fetch-depth : 0
207- fetch-tags : true
208-
209- - name : Setup toolchain
210- uses : ./.github/actions/setup-node-pnpm
211-
212- - name : Run Fallow audit
213- env :
214- FALLOW_BASE : ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
215- uses : ./.github/actions/run-gate
216- with :
217- gate : fallow
218- args : |
219- --base
220- ${{ env.FALLOW_BASE }}
221-
222- - name : Check for production-unused exports
223- uses : ./.github/actions/run-gate
224- with : { gate: production-exports }
225-
226238 # The frozen replay-compat corpus (#1417) claims each entry was published by
227239 # a released tag. Only a full-history checkout can re-derive that claim.
228240 - name : Verify corpus entries against their released blobs
@@ -235,52 +247,21 @@ jobs:
235247
236248 # The daemon RPC wire ledger (#1432) is compared against the ledger as it
237249 # stood at the last RELEASED tag, which only a tagged checkout can read.
238- # The shallow Repo Guards lane holds the ledger to its source; this step
239- # holds it to the last release.
240250 - name : Compare the daemon RPC wire surface against the last released tag
241251 uses : ./.github/actions/run-gate
242252 with : { gate: daemon-wire-compat }
243253
244- # Typecheck and package verification share one checkout and install; both
245- # need the default toolchain only, and the package step re-pins Node itself.
246- typecheck-package :
247- name : Typecheck & Package
248- runs-on : ubuntu-latest
249- timeout-minutes : 20
250- steps :
251- - name : Checkout
252- uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
253-
254- - name : Setup toolchain
255- uses : ./.github/actions/setup-node-pnpm
256-
257- - name : Run typecheck
254+ - name : Check numeric ranges
258255 uses : ./.github/actions/run-gate
259- with : { gate: typecheck }
256+ with : { gate: freerange }
260257
261- - name : Build CLI
262- uses : ./.github/actions/run-gate
263- with : { gate: build }
258+ # Shares fallow's `.fallow` cache directory with the audit, so it starts once the audit ends.
259+ - name : Wait for the Fallow audit
260+ wait : fallow-audit
264261
265- - name : Verify emitted chunk ownership
262+ - name : Check for production-unused exports
266263 uses : ./.github/actions/run-gate
267- with : { gate: bundle-owner-files }
268-
269- # The build runs on the default toolchain Node and the package is verified on the minimum
270- # supported Node, so this job covers what a user on `engines.node` floor actually installs.
271- - name : Setup Node.js 22.12
272- uses : actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
273- with :
274- node-version : ' 22.12'
275-
276- # Packs, lints the tarball with publint/attw, installs it outside the workspace, and imports
277- # every published entry point before running the CLI. See scripts/check-package.ts.
278- #
279- # Runs the script directly rather than through `pnpm check:package`: the repo's pinned pnpm
280- # requires Node >= 22.13 and refuses to start on the 22.12 floor this job exists to cover. The
281- # gate itself only needs `node` and `npm`, so it is the package.json script minus the launcher.
282- - name : Verify the published package on Node.js 22.12
283- run : node --experimental-strip-types scripts/check-package.ts
264+ with : { gate: production-exports }
284265
285266 # Runs the full unit + provider-integration suites under coverage with
286267 # thresholds, so a separate unit-tests job would rerun the same tests.
0 commit comments