Skip to content

CI hardening: reusable workflows, CI images, pinned actions, lint and Renovate - #157

Merged
Kinflou merged 1 commit into
mainfrom
ci-hardening
Nov 11, 2026
Merged

Kinflou merged 1 commit into
mainfrom
ci-hardening

Conversation

@Kinflou

@Kinflou Kinflou commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Phase 4 of the org CI overhaul (same pattern as core#257 and runtime#120). Draft; no settings changed.

What moved

  • Rust matrix: rust_xp and build_and_test are the org's reusable rust-ci.yml (stable, beta, nightly on ubuntu-24.04; stable on ubuntu-24.04-arm, macos-15, windows-2025; a non-blocking ubuntu-26.04 canary). cargo run -p xtask -- --check can't run after the tests there, so it is the reusable's extra-setup hook: it runs in every job before the build, so it stays checked on every platform, and it builds the dependencies the build then reuses. No --locked: the repository doesn't commit a Cargo.lock.
  • wasm32-wasip1 build: in the ci-wasm image, with rust-cache.
  • Bench count (bench.yml): the count shards run in the ci-bench image, so valgrind comes from the image (3.24) and not from apt-get install. No apt, brew, choco or curl | sh is left in .github/.
  • Node jobs stay on the VM: SHA-pinned actions/setup-node, exact versions (20.20.2, 22.23.5; the bench keeps 22.23.4, see below), cache: npm keyed on the lockfiles. The Rust reference and CLI installs use dtolnay/rust-toolchain at 1.99.1 instead of rustup update stable.
  • lint.yml calls the reusable lint with renovate-config: renovate.json (group ci-lint-..., not lint-...). renovate.json extends github>ComlineProject/.github:renovate-config; the preset already has npm on (config:recommended, one grouped lockfile-only PR), so nothing was added.
  • rust-toolchain.toml: exact 1.99.1. No cargo update was run, and the pinned core and generation git revisions build under 1.99.1 (the rust and wasip1 jobs are green).

What stayed local, and why

  • The bench is not the reusable bench. That workflow is the iai-callgrind gate for a Cargo project (cargo bench on base and head, a report script speaking --targets). This repository's bench is valgrind/callgrind over Node running the TypeScript runtime, sharded, with no base to compare. It keeps its own workflow and uses the image for valgrind only.
  • The bench needs Node inside the container. ci-bench has none and I did not add it to the image: the count jobs install an exact Node with actions/setup-node inside the container (works; the cc for the region addon and python3 come from the image). The merge/publish job stays on the VM (it runs node bench/shared.mjs).
  • harden-runner is on every VM job (audit); it can't run in container jobs (wasip1, count).
  • The conformance-spec and vendor-core.sh --check steps stay in the Node job on the VM: vendor-core.sh installs the runtime's pinned toolchain with rustup.

Hardening

Pinned runs-on labels; top-level permissions: contents: read; write only on the jobs that push (bench, reports publish, nightly publish) or open issues (nightly issue); persist-credentials: false everywhere except those pushing jobs; concurrency cancels in-progress runs on pull requests only; timeout-minutes on every job; every uses: pinned to a 40-hex SHA with a version comment; defaults: run: shell: bash for container jobs; ${{ }} values in run: moved to env:. The schedule in nightly.yml is unchanged.

Two workflows were split so the job that runs the repository's code and dependencies has a read-only token:

  • reports.yml: reports (measure, upload) and publish (download, push). Publish no longer runs on pull requests, as in core and runtime; a manual run from a branch still does a dry run.
  • nightly.yml: properties (read-only), publish (contents: write) and issue (issues: write, no checkout).

Things to know

  • Bench history steps up. valgrind goes from 3.22 (Ubuntu 24.04) to 3.24, and the userland under Node from Ubuntu 24.04 to Debian 13 (Rust 1.99.1 does not touch these counts: the wasm core is vendored, built). Node stays at 22.23.4, what the published history was counted with, so that is not a third variable. A manual run on this branch (dry-run publish) against the published report on reports: 56 benchmarks in both; median change -0.11% (instructions) and -0.29% (instructions-opt), range -1.37% to +0.60%, though the published report is from an earlier commit. There is no gate and no threshold here; nothing was loosened.
  • Check names change: Rust project - stable, Rust project - stable (<os>) and the rest of the Rust matrix are now rust / test (...) and rust / canary (ubuntu-26.04). The branch has no protection or rulesets, so nothing requires the old names today.
  • std_extra and floor and the Node jobs are unchanged apart from pinning, timeouts and caching.

Checks

All green on this branch: CI (pull request and push), Lint, Reports, Benchmarks smoke, and manual runs of bench.yml (4 container shards plus merge, dry-run publish), nightly.yml (properties, publish, issue skipped) and reports.yml from the branch. Wall time of the CI workflow on a warm run: 2m12s here against 2 to 5m before (the 5m23s on the last main push had a cold CLI build).

…mages

The Rust matrix is the reusable rust-ci.yml, the wasm build runs in the CI
wasm image and the valgrind count in the CI bench image (no apt install),
every action is pinned by SHA, tokens are read-only except in the jobs that
push, and the reports and nightly workflows split their publish and issue
steps into jobs of their own. Adds lint.yml, renovate.json and an exact
rust-toolchain.toml (1.99.1).
@Kinflou
Kinflou marked this pull request as ready for review November 11, 2026 23:19
@Kinflou
Kinflou merged commit d872625 into main Nov 11, 2026
69 checks passed
@Kinflou
Kinflou deleted the ci-hardening branch November 11, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant