Skip to content

Commit c7404c5

Browse files
thymikeeclaude
andcommitted
ci: run the fallow audit in the background and drop the fallow cache
The persisted cache only helps an identical tree: a PR head restored from its base still re-resolves every import (524s audit, 209s health on CI). Starting the audit beside freerange and the light guards takes it off the job's sequential path instead. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 365a0f5 commit c7404c5

2 files changed

Lines changed: 20 additions & 93 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 20 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -148,21 +148,26 @@ jobs:
148148
- name: Setup toolchain
149149
uses: ./.github/actions/setup-node-pnpm
150150

151-
# Slowest guard (~4.5 min) and independent of the others, so it runs beside them.
151+
# The two slowest gates run in the background beside the light guards below. A cold fallow
152+
# run costs several minutes on a hosted runner: since fallow 3.20 every import re-walks the
153+
# root tsconfig's project references.
152154
- name: Check numeric ranges
153155
id: freerange
154156
background: true
155157
uses: ./.github/actions/run-gate
156158
with: { gate: freerange }
157159

158-
# A cold fallow run re-resolves every import against the root tsconfig's project
159-
# references, which costs minutes on a hosted runner; the parse cache skips unchanged files.
160-
- name: Restore fallow cache
161-
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.2.3
160+
- name: Run Fallow audit
161+
id: fallow-audit
162+
background: true
163+
env:
164+
FALLOW_BASE: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
165+
uses: ./.github/actions/run-gate
162166
with:
163-
path: .fallow
164-
key: fallow-${{ github.job }}-${{ github.sha }}
165-
restore-keys: fallow-${{ github.job }}-
167+
gate: fallow
168+
args: |
169+
--base
170+
${{ env.FALLOW_BASE }}
166171
167172
- name: Check import-direction DAG
168173
# Structured import-direction lint over the resolved graph. See
@@ -236,20 +241,6 @@ jobs:
236241
uses: ./.github/actions/run-gate
237242
with: { gate: mcp-metadata }
238243

239-
- name: Run Fallow audit
240-
env:
241-
FALLOW_BASE: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
242-
uses: ./.github/actions/run-gate
243-
with:
244-
gate: fallow
245-
args: |
246-
--base
247-
${{ env.FALLOW_BASE }}
248-
249-
- name: Check for production-unused exports
250-
uses: ./.github/actions/run-gate
251-
with: { gate: production-exports }
252-
253244
# The frozen replay-compat corpus (#1417) claims each entry was published by
254245
# a released tag. Only a full-history checkout can re-derive that claim.
255246
- name: Verify corpus entries against their released blobs
@@ -266,13 +257,13 @@ jobs:
266257
uses: ./.github/actions/run-gate
267258
with: { gate: daemon-wire-compat }
268259

269-
# Main pushes refresh the cache PR runs restore; PR runs only read it.
270-
- name: Save fallow cache
271-
if: ${{ github.event_name == 'push' }}
272-
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.2.3
273-
with:
274-
path: .fallow
275-
key: fallow-${{ github.job }}-${{ github.sha }}
260+
# Shares fallow's `.fallow` cache directory with the audit, so it starts once the audit ends.
261+
- name: Wait for the Fallow audit
262+
wait: fallow-audit
263+
264+
- name: Check for production-unused exports
265+
uses: ./.github/actions/run-gate
266+
with: { gate: production-exports }
276267

277268
- name: Wait for numeric ranges
278269
wait: freerange
@@ -292,14 +283,6 @@ jobs:
292283
- name: Setup toolchain
293284
uses: ./.github/actions/setup-node-pnpm
294285

295-
# The CRAP steps score through `fallow health`; see Repo Guards for why its cache matters.
296-
- name: Restore fallow cache
297-
uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.2.3
298-
with:
299-
path: .fallow
300-
key: fallow-${{ github.job }}-${{ github.sha }}
301-
restore-keys: fallow-${{ github.job }}-
302-
303286
- name: Test changed-line coverage gate
304287
uses: ./.github/actions/run-gate
305288
with: { gate: coverage-model }
@@ -369,13 +352,6 @@ jobs:
369352
gate: coverage-crap
370353
args: --all
371354

372-
- name: Save fallow cache
373-
if: ${{ !cancelled() && github.event_name == 'push' }}
374-
uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.2.3
375-
with:
376-
path: .fallow
377-
key: fallow-${{ github.job }}-${{ github.sha }}
378-
379355
integration:
380356
name: Integration Tests
381357
runs-on: ubuntu-latest

‎.github/workflows/fallow-probe.yml‎

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)