Skip to content

fix(ci): clear node20 deprecations and repair silently-failing workflows - #487

Merged
d-oit merged 7 commits into
mainfrom
fix/ci-warnings-and-stale-assets
Nov 5, 2026
Merged

d-oit merged 7 commits into
mainfrom
fix/ci-warnings-and-stale-assets

Conversation

@d-oit

@d-oit d-oit commented Nov 5, 2026

Copy link
Copy Markdown
Owner

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 24 on every run:

Action Was Now
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

Every SHA was resolved from its release tag via gh api, and each declared runtime confirmed by reading action.yml at that ref. I checked the one real breaking change (github-script v9 drops require('@actions/github')); none of our call sites use it.

Two more skews found in the sweep:

  • Swatinem/rust-cache was pinned to two different commits — .github/actions/setup-rust used e18b497, five workflows used c8037a8. Unified on v2.9.3.
  • dtolnay/rust-toolchain was likewise split between two SHAs. Unified on stable head.

Version comments were also wrong (# v6 on a v4.4.0 checkout, # v4 on a v5.6.0 setup-python) and are now correct.

Silent failures

Update Overview Diagram reported success while publishing nothing. It pushed directly to protected main, retried the identical rejection 5×, then ran gh pr create without GH_TOKEN. gh exits non-zero immediately in that state and the || echo swallowed it, so the step exited 0. A stale docs/update-overview-diagram branch from that run is on the remote.

Release Preflight could never accept a template tag. It compared the tag to VERSION, which per AGENTS.md intentionally stays 0.0.0. Every v0.4.x tag was rejected.

post-release-check had no repository read access — declared issues: write only while running actions/checkout.

The 2026-09-24 Release runs (0 jobs) were a permissions: block that had absorbed the job outputs: 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:

Label Diagram said Reality
Crates 12 15 workspace members (10 under crates/)
AI Skills 25 26
Pipeline Jobs 45 40
Quality Checks 1 19 in the gate
Workflow files 22 21
Shell scripts 31 34

The 1 was a real bug: the counter scraped scripts/quality-gates.sh for cargo invocations, but that file became a thin cargo xtask wrapper, so exactly one line matched. It now reads config/xtask.json.

Also fixed: docs/src/overview.png was 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 or checkout without contents. Both historical bugs reproduced against mutated fixtures.

Verification

  • ./scripts/quality-gates.sh — 19/19 pass
  • actionlint + scripts/validate-workflows.sh — clean
  • Diagram regeneration is byte-stable across runs
  • bash scripts/check-template-version.sh — badge and changelog agree

Tagging is left to you; v0.4.0 will now pass preflight.

d-oit added 7 commits November 5, 2026 19:05
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.
@codacy-production

Copy link
Copy Markdown
Contributor

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@d-oit
d-oit merged commit 0a57327 into main Nov 5, 2026
25 checks passed
@d-oit
d-oit deleted the fix/ci-warnings-and-stale-assets branch November 5, 2026 19:21
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant