Commit cc55d8c
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
File tree
- .github/workflows
- scripts
- schemas
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
82 | 88 | | |
83 | 89 | | |
84 | 90 | | |
| |||
222 | 228 | | |
223 | 229 | | |
224 | 230 | | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
225 | 242 | | |
226 | 243 | | |
227 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
236 | 236 | | |
237 | 237 | | |
238 | 238 | | |
239 | | - | |
| 239 | + | |
240 | 240 | | |
241 | 241 | | |
242 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
163 | | - | |
| 163 | + | |
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
161 | | - | |
| 161 | + | |
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| |||
0 commit comments