Skip to content

Commit 43cd348

Browse files
claude[bot]claude
andauthored
fix(ci): schedule Test Core on a scripts-only diff (#9829) (#10014)
Six cross-package test-input declarations are rooted at `scripts/`, and the `--union-into` step that pulls their packages back into the affected set is a step INSIDE the `test` job — a job the `core` paths-filter never let start for a `scripts/`-only diff, because `core` names no path under `scripts/`. Adds a fourth filter output, `scripts: ['scripts/**']`, and ORs it into the `test` job's condition only. Build Core, Dogfood and Temporal Conformance stay filtered exactly as they are today. Claude-Session: https://claude.ai/code/session_01XqDQYVU5smx29ts9pAErja Co-authored-by: Claude <noreply@anthropic.com>
1 parent cade340 commit 43cd348

1 file changed

Lines changed: 32 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
docs: ${{ steps.changes.outputs.docs || 'true' }}
3939
core: ${{ steps.changes.outputs.core || 'true' }}
4040
console: ${{ steps.changes.outputs.console || 'true' }}
41+
# Gates the `test` job ONLY, ORed with `core` — see the `scripts`
42+
# filter below and the `test` job's `if:` (#9829).
43+
scripts: ${{ steps.changes.outputs.scripts || 'true' }}
4144
# ── THE FILTER CONTRACT, both halves (#4928) ──────────────────────────
4245
#
4346
# Half 1 is the `|| 'true'` above: when in doubt, RUN EVERYTHING. It
@@ -107,6 +110,30 @@ jobs:
107110
- 'scripts/console-spec-probes.mjs'
108111
- 'scripts/assert-console-spec-injection.mjs'
109112
- '.github/workflows/ci.yml'
113+
# Test inputs that live OUTSIDE every package (#9829). Packages whose
114+
# suites read across their own boundary declare that radius in
115+
# scripts/check-cross-package-test-inputs.mjs, and turbo.json mirrors each
116+
# as a `$TURBO_ROOT$/…` input. SIX of those declarations are rooted at
117+
# `scripts/` — @objectstack/spec (`scripts/**`), @objectstack/cli,
118+
# @objectstack/metadata-protocol and create-objectstack (five single
119+
# files) — and the step that pulls those packages back into the affected
120+
# set, `--union-into` in the `test` job below, is a step INSIDE that job.
121+
# So on a `scripts/`-only diff `core` was false, the job never started,
122+
# the union never ran, and the declarations bought nothing at PR time:
123+
# the merge queue was the first signal, which is the #7802 failure this
124+
# whole mechanism exists to prevent. Measured with picomatch, the matcher
125+
# dorny/paths-filter uses: a diff confined to
126+
# `scripts/sync-template-versions.mjs` yields core=false.
127+
#
128+
# Deliberately a SEPARATE output rather than a widening of `core`,
129+
# because it gates ONE job — the `test` job ORs it with `core`, while
130+
# Build Core, Dogfood and Temporal Conformance stay filtered exactly as
131+
# they are today. `scripts/**` rather than the six declared paths: the
132+
# narrower filter does not exist while @objectstack/spec declares
133+
# `scripts/**`, and a hand-kept list of script paths is the failure mode
134+
# #7802 recorded ("a list you must remember to update").
135+
scripts:
136+
- 'scripts/**'
110137
111138
test:
112139
# Sharded 3-way BY PACKAGE: a core-touching PR ran the affected suite
@@ -129,8 +156,11 @@ jobs:
129156
name: Test Core (${{ matrix.shard }}/3)
130157
needs: filter
131158
# "Skip only when the filter EXPLICITLY said no core paths changed" — see
132-
# THE FILTER CONTRACT on the filter job's outputs (#4928).
133-
if: ${{ !cancelled() && needs.filter.outputs.core != 'false' }}
159+
# THE FILTER CONTRACT on the filter job's outputs (#4928). `scripts` is ORed
160+
# in, never ANDed: two independent reasons to run this job, and it skips only
161+
# when BOTH filters explicitly said false, so the contract's "when in doubt,
162+
# RUN EVERYTHING" posture is unchanged (#9829).
163+
if: ${{ !cancelled() && (needs.filter.outputs.core != 'false' || needs.filter.outputs.scripts != 'false') }}
134164
runs-on: ubuntu-latest
135165
# Backstop only — the stall guard on the test steps is the primary
136166
# detector for a #4250-style hang and fires well before this. 30 min is

0 commit comments

Comments
 (0)