Skip to content

Commit cc55d8c

Browse files
committed
ci: fix Node-version drift, add composite-action schema validation
Two independent hygiene fixes from the follow-up audit, bundled since both are small and neither conflicts with the other. Node-version drift: 13 release/publish-adjacent workflows hardcoded node-version: 24.18.0 while .nvmrc pins 22 -- every PR-facing workflow (ci.yml, ui-preview.yml, ui-deploy.yml, ui-sentry-release.yml, mcp-release-candidate.yml) already correctly used node-version-file: .nvmrc. Investigated before touching anything: none of the published packages' own engines fields (@loopover/engine, mcp, ui-kit all >=22.0.0; miner >=22.13.0) require Node 24, no comment anywhere explains the choice, and git history shows each was just whatever version was current when that particular publish workflow was first scaffolded, never reconciled against .nvmrc. Switched all 13 (18 occurrences) to node-version-file: .nvmrc for consistency. Left the two files already pinned to 22.23.1 alone (gittensor-impact.yml, visual-capture-fallback.yml) -- same major version as .nvmrc, not actually inconsistent, lower value/higher risk to touch than the real Node-24-vs-22 mismatch. Composite-action schema validation: this repo's actionlint (both the npm wrapper and the raw upstream binary, tested directly) does not support .github/actions/**/action.yml files at all -- confirmed a genuine, long-standing limitation (rhysd/actionlint#46 and #401, open since 2021), not a configuration gap. Every file passed to actionlint is parsed as a workflow regardless of shape, so it errors on runs/inputs/outputs as unexpected top-level keys rather than actually validating the composite action. scripts/lint-composite-actions.mjs is the closest available substitute: validates against GitHub's own official action-metadata JSON Schema (vendored locally at scripts/schemas/github-action.schema.json, not fetched live, so this check doesn't depend on network access in CI), plus a dedicated check for one thing the schema alone doesn't catch -- every run: step in a composite action needs an explicit shell:, unlike a top-level workflow job which defaults to bash. Verified it actually catches real problems, not just that it exists: fed it a deliberately broken action file (missing shell:, an invalid uses: type) and confirmed both classes of error surface clearly. Wired into test:ci (npm run lint:composite-actions) and a new "Lint composite actions" step in ci.yml, alongside the existing "Lint workflows" step. Also added .github/actions/** to the backend path filter -- it was missing entirely (only .github/workflows/** was covered), so a PR editing ONLY a composite action file would previously trigger neither this new check nor the existing actionlint step at all.
1 parent cd52bed commit cc55d8c

18 files changed

Lines changed: 820 additions & 19 deletions

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ jobs:
7979
- 'scripts/**'
8080
- 'migrations/**'
8181
- '.github/workflows/**'
82+
# .github/actions/** (composite actions, e.g. setup-workspace) is workflow-adjacent
83+
# infrastructure the same way .github/workflows/** above is -- without this, a PR editing
84+
# ONLY a composite action file (touching nothing else backend matches) would skip both
85+
# "Lint workflows" and "Lint composite actions" below entirely, with zero CI signal on a
86+
# broken edit until the next push-triggered full run.
87+
- '.github/actions/**'
8288
- 'wrangler.jsonc'
8389
- 'worker-configuration.d.ts'
8490
- '.loopover.yml'
@@ -222,6 +228,17 @@ jobs:
222228
- name: Lint workflows
223229
if: ${{ github.event_name == 'push' || needs.changes.outputs.backend == 'true' }}
224230
run: npm run actionlint
231+
# actionlint (above) does not cover .github/actions/**/action.yml at all -- confirmed a genuine,
232+
# long-standing upstream limitation (rhysd/actionlint#46 and #401, open since 2021), not something
233+
# fixable by a different invocation: even the raw actionlint binary, run directly with no wrapper,
234+
# treats any file it's given as a workflow and errors on runs/inputs/outputs as unexpected
235+
# top-level keys. This validates composite action files against GitHub's own official
236+
# action-metadata JSON Schema instead -- real structural validation, not the full expression-
237+
# context linting actionlint does for workflows, which genuinely doesn't exist anywhere for
238+
# action.yml files.
239+
- name: Lint composite actions
240+
if: ${{ github.event_name == 'push' || needs.changes.outputs.backend == 'true' }}
241+
run: npm run lint:composite-actions
225242
- name: Check migrations
226243
if: ${{ github.event_name == 'push' || needs.changes.outputs.backend == 'true' }}
227244
run: npm run db:migrations:check

.github/workflows/mcp-release-please.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ jobs:
236236
- name: Setup Node
237237
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
238238
with:
239-
node-version: 24.18.0
239+
node-version-file: .nvmrc
240240
- name: Publish any package whose committed version isn't live on npm yet
241241
env:
242242
GH_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}

.github/workflows/mcp-release-watch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Setup Node
2828
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
2929
with:
30-
node-version: 24.18.0
30+
node-version-file: .nvmrc
3131

3232
- name: Check MCP release status
3333
env:

.github/workflows/mcp-ui-version-sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Setup Node
3535
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
3636
with:
37-
node-version: 24.18.0
37+
node-version-file: .nvmrc
3838

3939
# No npm ci -- the script only imports Node built-ins.
4040
- name: Sync the known-latest constant

.github/workflows/orb-beta-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Setup Node
3939
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
4040
with:
41-
node-version: 24.18.0
41+
node-version-file: .nvmrc
4242

4343
- name: Check whether an ORB beta is due
4444
id: report

.github/workflows/orb-stable-release-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Setup Node
3838
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
3939
with:
40-
node-version: 24.18.0
40+
node-version-file: .nvmrc
4141

4242
- name: Check whether a stable ORB release is due
4343
id: report

.github/workflows/publish-engine.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
- name: Setup Node
6060
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
6161
with:
62-
node-version: 24.18.0
62+
node-version-file: .nvmrc
6363

6464
- name: Resolve release version
6565
id: version
@@ -160,7 +160,7 @@ jobs:
160160
- name: Setup Node
161161
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
162162
with:
163-
node-version: 24.18.0
163+
node-version-file: .nvmrc
164164
registry-url: https://registry.npmjs.org
165165

166166
- name: Create or verify release tag

.github/workflows/publish-mcp.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
- name: Setup Node
5555
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
5656
with:
57-
node-version: 24.18.0
57+
node-version-file: .nvmrc
5858

5959
# workflow_dispatch has no tag ref to derive a version from (unlike the old push:tags: trigger),
6060
# so the dispatched commit's package.json is now the single source of truth for VERSION/TAG. Pure
@@ -177,7 +177,7 @@ jobs:
177177
- name: Setup Node
178178
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
179179
with:
180-
node-version: 24.18.0
180+
node-version-file: .nvmrc
181181
registry-url: https://registry.npmjs.org
182182

183183
- name: Create or verify release tag
@@ -244,7 +244,7 @@ jobs:
244244
- name: Setup Node
245245
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
246246
with:
247-
node-version: 24.18.0
247+
node-version-file: .nvmrc
248248
- name: Sync and open a PR if the known-latest copy is now stale
249249
env:
250250
# A real collaborator token, not github.token -- mirrors mcp-release-please.yml's own

.github/workflows/publish-miner.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- name: Setup Node
6161
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
6262
with:
63-
node-version: 24.18.0
63+
node-version-file: .nvmrc
6464

6565
- name: Resolve release version
6666
id: version
@@ -158,7 +158,7 @@ jobs:
158158
- name: Setup Node
159159
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
160160
with:
161-
node-version: 24.18.0
161+
node-version-file: .nvmrc
162162
registry-url: https://registry.npmjs.org
163163

164164
- name: Create or verify release tag

.github/workflows/publish-ui-kit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
- name: Setup Node
6060
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
6161
with:
62-
node-version: 24.18.0
62+
node-version-file: .nvmrc
6363

6464
- name: Resolve release version
6565
id: version
@@ -159,7 +159,7 @@ jobs:
159159
- name: Setup Node
160160
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
161161
with:
162-
node-version: 24.18.0
162+
node-version-file: .nvmrc
163163
registry-url: https://registry.npmjs.org
164164

165165
- name: Create or verify release tag

0 commit comments

Comments
 (0)