Repository navigation
fix(ci): clear node20 deprecations and repair silently-failing workflows - #487
Merged
Merged
Conversation
Eight actions were pinned several majors behind and logged
'Node.js 20 is deprecated. The following actions target Node.js 20 but are
being forced to run on Node.js 24' in every job that used them. Node 24 landed
in a new major line for each, so all eight need a major bump:
actions/checkout v4.4.0 -> v7.0.1
actions/github-script v7.1.0 -> v9.0.0
actions/labeler v5.0.0 -> v7.0.0
actions/setup-node v4.4.0 -> v7.1.0
actions/setup-python v5.6.0 -> v7.1.0
dependabot/fetch-metadata v2.5.0 -> v3.1.0
dorny/paths-filter v3.0.4 -> v4.0.3
peter-evans/create-pull-request v6.1.0 -> v8.1.1
Each SHA was resolved from its release tag with 'gh api' and its declared
runtime confirmed by reading action.yml at that ref. The three github-script
call sites use only the injected context/octokit and require('fs'), so the v9
ESM-only change to require('@actions/github') does not apply. setup-node v6+
limits automatic caching to npm, which is what these workflows already use.
Swatinem/rust-cache was pinned to two different commits (.github/actions/
setup-rust used e18b497, five workflows used c8037a8), so the composite action
and its callers cached under different keys. Both now use v2.9.3.
dtolnay/rust-toolchain was likewise split between two SHAs; both now use the
current 'stable' head.
Version comments were rewritten in the same pass: they claimed v6 for a v4.4.0
checkout, v4 for a v5.6.0 setup-python, and v2 for a v3.0.4 paths-filter.
secretlint and Update Overview Diagram also pinned node-version 20, which
reached end of life on 2026-04-30; both now use 24.
Two workflows reported success or failed at startup for reasons that were invisible in the Actions UI. Update Overview Diagram pushed directly to the protected main branch, retried the same rejection five times, then ran 'gh pr create' without GH_TOKEN. gh exits non-zero immediately in that state, and the '|| echo' fallback swallowed it, so the step exited 0 and the job looked green while publishing nothing. The stray docs/update-overview-diagram branch from that run is stale. The step now sets GH_TOKEN, pushes once, and on rejection pushes the branch and opens or reuses a pull request with 'set -euo pipefail' so a real failure fails. Release Preflight compared the pushed tag against VERSION, which intentionally stays 0.0.0 in the template (AGENTS.md). Every template tag such as v0.4.0 was therefore rejected, making the release path unreachable. It now accepts a tag matching either VERSION or the changelog's latest release, and still fails closed with both expected values in the error when it matches neither. post-release-check declared only 'issues: write' while also running actions/checkout. Declaring any permission sets every unlisted one to none, so the checkout had no repository read access. Added 'contents: read'. The diagram workflow also missed examples/, benchmarks, scripts/, config and workflow changes in its trigger paths, so structural changes did not refresh the asset.
The committed infographic advertised numbers that had been wrong for months:
12 crates (15 workspace members), 25 skills (26), 45 pipeline jobs (40), and
'1 Quality Checks'.
The '1' was a code bug, not staleness. _count_quality_checks scraped
scripts/quality-gates.sh for lines containing cargo/rustfmt/clippy/audit/deny;
that script is now a thin wrapper around 'cargo xtask', so the scrape matched
exactly one line. It now counts the union of the per-tier check lists in
config/xtask.json, with the QualityCheck enum as fallback, which resolves to 21
runnable checks and 19 in the default gate.
The crates row conflated two real counts, so it now states both: 10 directories
under crates/ and 15 workspace members. The workspace also gains examples/* and
benchmarks, which the old label hid.
Stats are now labelled by what they measure ('Workspace Members', 'CI Jobs')
rather than by a nearby path.
docs/src/overview.png was previously a different, larger image than
.template/overview.png (275 KB vs 120 KB); both are now the same generated
file, and scripts/sync-architecture.sh copies both assets so they cannot drift
apart again.
Wires the two new contract tests into the quality-gate job and installs PyYAML explicitly, so they cannot silently degrade to no-ops on a runner image that does not ship it.
Both fixes in this branch address failures that CI did not catch, so add the contracts that would have caught them. tests/overview_diagram_test.sh compares the numbers embedded in the committed Excalidraw source against freshly discovered numbers and fails when they diverge. It also fails when the quality count resolves to 0 or 1, which is always a broken counter rather than a small repository. Verified against the historical asset, where it reports: Quality Checks: diagram says '1', repository has 21. tests/workflow_permissions_test.sh parses every workflow and fails when a job declares an unknown permission scope or runs actions/checkout without 'contents'. The first catches a job 'outputs:' block landing under 'permissions:' -- the shape that took Release down with zero jobs on 2026-09-24; the second catches the post-release-check bug. Both were reproduced against mutated fixtures before wiring the test in.
…rkflows The verify-actions skill is supposed to prevent exactly the drift this branch fixed, but its own reference table listed actions/checkout v6, actions/github-script v7, and a Swatinem/rust-cache commit two majors behind. Following it would have reintroduced the Node.js 20 deprecation. Every row is regenerated from a SHA currently pinned in .github/, so each entry is verified against a real reference rather than copied forward. Adds the three actions the table omitted (attest-build-provenance, codecov-action, mozilla-actions/sccache-action, dependabot/fetch-metadata, dorny/paths-filter, peter-evans/create-pull-request, and the rest) and documents how to detect a deprecated action runtime by reading action.yml at the pinned ref.
Documents the Node 24 action migration, the two silently-failing workflows, the incomplete release preflight and post-release permissions, the stale overview diagram counts, and the refreshed SHA table.
Contributor
Up to standards ✅🟢 Issues
|
d-oit
added a commit
that referenced
this pull request
Nov 5, 2026
…489) The Update Overview Diagram workflow opened a spurious pull request on its first run after merging #487. The diff touched only the PNG: the SVG and Excalidraw output were byte-identical, so the diagram content was already correct. PNG export rasterises through the local font stack, so an unchanged diagram produces different bytes on a runner than on a developer machine. Nothing embeds the PNG -- README.md and docs/src/architecture.md both reference overview.svg -- so the binary was pure churn: every automated run would have proposed a new one. The PNG is removed from the tracked tree and from the automated path. '--png-out' still works for an ad hoc raster preview; the skill documents why it should not be committed. Verified: regenerating locally now produces no diff at all, and PR #488 is closed with its branch deleted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses every failing CI run, deprecation warning, and latent defect I could find. Most of it was warnings and silent failures, not red builds — which is why it went unnoticed.
Warnings (visible in nearly every job)
All eight actions below logged
Node.js 20 is deprecated. The following actions target Node.js 20 but are being forced to run on Node.js 24on every run:actions/checkoutactions/github-scriptactions/labeleractions/setup-nodeactions/setup-pythondependabot/fetch-metadatadorny/paths-filterpeter-evans/create-pull-requestEvery SHA was resolved from its release tag via
gh api, and each declared runtime confirmed by readingaction.ymlat that ref. I checked the one real breaking change (github-scriptv9 dropsrequire('@actions/github')); none of our call sites use it.Two more skews found in the sweep:
Swatinem/rust-cachewas pinned to two different commits —.github/actions/setup-rustusede18b497, five workflows usedc8037a8. Unified on v2.9.3.dtolnay/rust-toolchainwas likewise split between two SHAs. Unified onstablehead.Version comments were also wrong (
# v6on a v4.4.0 checkout,# v4on a v5.6.0 setup-python) and are now correct.Silent failures
Update Overview Diagramreported success while publishing nothing. It pushed directly to protectedmain, retried the identical rejection 5×, then rangh pr createwithoutGH_TOKEN.ghexits non-zero immediately in that state and the|| echoswallowed it, so the step exited 0. A staledocs/update-overview-diagrambranch from that run is on the remote.Release Preflightcould never accept a template tag. It compared the tag toVERSION, which perAGENTS.mdintentionally stays0.0.0. Everyv0.4.xtag was rejected.post-release-checkhad no repository read access — declaredissues: writeonly while runningactions/checkout.The 2026-09-24 Release runs (0 jobs) were a
permissions:block that had absorbed the joboutputs:keys. Actionlint catches that, and it was wired into the gate after the incident — I verified it flags the historical file.Stale README diagram (this answers "does the image need an update?")
Yes. The README embeds
.template/overview.svg, which claimed:crates/)The
1was a real bug: the counter scrapedscripts/quality-gates.shforcargoinvocations, but that file became a thincargo xtaskwrapper, so exactly one line matched. It now readsconfig/xtask.json.Also fixed:
docs/src/overview.pngwas a different, larger image than.template/overview.png(275 KB vs 120 KB).New regression tests
Both fixes address failures CI did not catch, so:
tests/overview_diagram_test.sh— compares embedded stats against live discovery; fails on 0 or 1 quality checks. Verified against the old asset:Quality Checks: diagram says '1', repository has 21.tests/workflow_permissions_test.sh— fails on unknown permission scopes orcheckoutwithoutcontents. Both historical bugs reproduced against mutated fixtures.Verification
./scripts/quality-gates.sh— 19/19 passactionlint+scripts/validate-workflows.sh— cleanbash scripts/check-template-version.sh— badge and changelog agreeTagging is left to you;
v0.4.0will now pass preflight.