Skip to content

chore(ci): inline dtolnay/rust-toolchain, SHA-pin every other third-party action - #8684

Closed
jdalton wants to merge 1 commit into
PerryTS:mainfrom
jdalton:chore/pin-and-inline-actions
Closed

chore(ci): inline dtolnay/rust-toolchain, SHA-pin every other third-party action#8684
jdalton wants to merge 1 commit into
PerryTS:mainfrom
jdalton:chore/pin-and-inline-actions

Conversation

@jdalton

@jdalton jdalton commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Reduces the third-party action trust surface in .github/: the most common action is inlined instead of depended on, and every remaining tag-pinned action gets pinned to a commit SHA. Fixes a real, currently-broken reference found along the way.

What changed and why

dtolnay/rust-toolchain@stable appeared 45 times across 23 workflow files, and every single call site passed the same toolchain: 'nightly-2026-08-20' that rust-toolchain.toml at the repo root already pins. Installing a pinned toolchain is one rustup toolchain install command, so there is no reason to depend on a third-party action for it. I replaced every occurrence with an inline run: rustup toolchain install nightly-2026-08-20 --profile minimal step, translating each site's components:/targets: inputs into the matching --component/--target flags so the installed toolchain is identical to what the action produced.

Every other third-party or actions/* reference that was still pinned to a mutable tag (actions/checkout, actions/cache and its restore/save forms, actions/setup-node, actions/upload-artifact, actions/download-artifact, the three GitHub Pages actions, ilammy/msvc-dev-cmd, mozilla-actions/sccache-action, Swatinem/rust-cache, oven-sh/setup-bun, taiki-e/install-action) now pins the commit SHA that tag currently resolves to, with the tag kept as a trailing comment for readability. A tag can be silently repointed after review lands; a SHA can't.

While resolving these I found taiki-e/install-action@v3 does not exist upstream at all — that action has never shipped a v3, the latest release is v2.86.6. coverage.yml's cargo-llvm-cov install step has failed with startup_failure on every scheduled run for weeks as a result. Pinned to the real latest release instead of the tag that never existed.

Changes

The first commit inlines dtolnay/rust-toolchain across 23 workflow files. The second commit SHA-pins every other newly-identified tag reference across 30 files, including the taiki-e/install-action fix described above.

Related issue

n/a

Test plan

I ran actionlint against every touched workflow file before and after each commit and diffed the findings: the only differences are line-number shifts from the shorter inlined blocks, with zero new findings introduced. I confirmed every workflow file still parses as valid YAML after each transform. I resolved each action's SHA directly against the GitHub API (git/refs/tags/<tag>) rather than guessing, and spot-checked that the resulting pins match SHAs already in use elsewhere in the same files where that tag already appeared pinned. cargo build --release and the workspace test suite are not applicable, since no Rust source changed.

Checklist

I have not bumped the workspace version or edited CLAUDE.md or CHANGELOG.md. My commits follow the chore: prefix convention used in the log. I have read CONTRIBUTING.md and agree to the Code of Conduct.

Summary by CodeRabbit

  • Chores
    • Secured CI, release, and deployment automation by pinning workflow actions to immutable versions.
    • Standardized installation of the required Rust nightly toolchain across automated builds and checks.
    • Updated caching and Node.js setup configuration for more consistent workflow execution.
    • Maintained existing build, test, package, release, and documentation deployment behavior.

@coderabbitai

coderabbitai Bot commented Aug 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 3506b336-b75d-4756-b480-95e9ad77a041

📥 Commits

Reviewing files that changed from the base of the PR and between 878aba3 and 9911c25.

📒 Files selected for processing (18)
  • .github/workflows/auto-opt-app-patterns.yml
  • .github/workflows/coverage.yml
  • .github/workflows/eh-transport.yml
  • .github/workflows/ext-link.yml
  • .github/workflows/feature-matrix.yml
  • .github/workflows/gc-moving-witnesses.yml
  • .github/workflows/gc-native-roots.yml
  • .github/workflows/gc-parse-churn-gate.yml
  • .github/workflows/gc-ptr-shape-off-witness.yml
  • .github/workflows/next-app-route.yml
  • .github/workflows/node-compat-matrix.yml
  • .github/workflows/node-core-subset.yml
  • .github/workflows/node-suite-guard.yml
  • .github/workflows/npm-package-sweep.yml
  • .github/workflows/release-packages.yml
  • .github/workflows/security-audit.yml
  • .github/workflows/test.yml
  • .github/workflows/tls-budget.yml
🚧 Files skipped from review as they are similar to previous changes (10)
  • .github/workflows/gc-moving-witnesses.yml
  • .github/workflows/tls-budget.yml
  • .github/workflows/gc-parse-churn-gate.yml
  • .github/workflows/feature-matrix.yml
  • .github/workflows/gc-ptr-shape-off-witness.yml
  • .github/workflows/eh-transport.yml
  • .github/workflows/gc-native-roots.yml
  • .github/workflows/node-core-subset.yml
  • .github/workflows/release-packages.yml
  • .github/workflows/auto-opt-app-patterns.yml

Included review availability: Your plan provides up to 8 included reviews per hour; 4 remain after this review.


📝 Walkthrough

Walkthrough

Changes

The pull request pins GitHub Actions to immutable commit SHAs across CI, release, packaging, deployment, and analysis workflows. Rust workflows install nightly-2026-08-20 directly with rustup. Workflow behavior remains unchanged.

CI workflow hardening

Layer / File(s) Summary
Workflow action and toolchain updates
.github/workflows/auto-opt-app-patterns.yml, .github/workflows/benchmark.yml, .github/workflows/container-tests.yml, .github/workflows/coverage.yml, .github/workflows/docs.yml, .github/workflows/eh-transport.yml, .github/workflows/ext-link.yml, .github/workflows/feature-matrix.yml, .github/workflows/gate-freshness.yml, .github/workflows/gc-*.yml, .github/workflows/llvm-inprocess.yml, .github/workflows/next-app-route.yml, .github/workflows/node-compat-matrix.yml, .github/workflows/node-core-subset.yml, .github/workflows/node-suite-guard.yml, .github/workflows/npm-*.yml, .github/workflows/release-hono-server.yml, .github/workflows/release-packages.yml, .github/workflows/security-audit.yml, .github/workflows/simctl-tests.yml, .github/workflows/tls-budget.yml
Workflow action references now use commit SHAs. Rust setup uses direct nightly toolchain installation where required.
Test workflow hardening
.github/workflows/test.yml
Rust cache and sccache references are refreshed across the test jobs. Existing immutable sccache save references remain unchanged.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 9911c

The workflow updates are merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Suggested reviewers: proggeramlug

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main CI hardening changes: inlining Rust toolchain setup and pinning third-party actions to commit SHAs.
Description check ✅ Passed The description covers the required summary, concrete changes, related issue, test plan, screenshots status, and checklist, with relevant validation details.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (18 skipped: 18 unsupported.)
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…arty action

dtolnay/rust-toolchain appeared 45 times across 23 workflow files, and every call site passed the same toolchain that rust-toolchain.toml at the repo root already pins - installing it is one rustup command, so there is no reason to depend on a third-party action for it. Replaced every occurrence with an inline rustup toolchain install step, translating each site's components/targets inputs into matching flags.

Every other action reference still pinned to a mutable tag now pins the commit SHA that tag currently resolves to, with the tag kept as a trailing comment. Found and fixed a real bug along the way: taiki-e/install-action@v3 does not exist upstream (latest is v2.86.6), so coverage.yml's cargo-llvm-cov install had failed with startup_failure on every scheduled run for weeks. Also caught and corrected two annotated-tag SHAs (Swatinem/rust-cache, mozilla-actions/sccache-action) that had resolved to the tag object instead of the commit it points to - verified each pin resolves to a real commit via the GitHub API before landing.
@jdalton
jdalton force-pushed the chore/pin-and-inline-actions branch from 9911c25 to 0ebb885 Compare August 24, 2026 04:02
proggeramlug added a commit that referenced this pull request Aug 24, 2026
…CI hardening (#8696)

Lands #8687, #8686 and #8684.

#8687 (closes #8679) replaces the post-RS4GC instruction-budget hard
refusal with a typed spill-retry: an already-lowered LlFunction switches
from native statepoint roots to a complete precise shadow frame and the
unit is rebuilt at the originally requested optimization level. This is
the durable handling for the estimator misses #8678 could only make more
accurate.

Retry termination is guaranteed rather than argued.
`request_shadow_frame_spill()` latches on `force_shadow_frame` and
returns false if already set; `apply_budget_spill_retry` records only the
functions where it returned true, and any violation not recorded becomes
a hard error naming it. A function therefore cannot be retried twice.

#8686 builds the gap suite's fast-mode archives once in a dedicated
`gap-suite-build` job and shares them across the six shards. The
skipped-vs-failed distinction is handled explicitly: `always()` keeps a
SKIPPED build (full mode, where the job never runs) from cascading into
skipped shards, while the guard still requires `success` or `skipped`, so
a genuine build FAILURE stops the shards. The shard also verifies the
downloaded binary is runnable and exports PERRY_BIN / PERRY_RUNTIME_DIR.

#8684 inlines dtolnay/rust-toolchain and SHA-pins every other
third-party action. Verified no job and no gate is dropped: the single
removed step is the fast-mode archive build, which moved into
gap-suite-build.

No version bump.

Co-authored-by: Ralph Küpper <ralph@skelpo.com>
@proggeramlug

Copy link
Copy Markdown
Contributor

Landed on main via #8696 (squash fdbddebe6).

For a CI-mechanics PR the risk I care about is silently-dropped coverage, so I diffed the job and step sets against main: no job removed, one added (gap-suite-build from #8686), and the single removed step is the fast-mode archive build — which moved into that job rather than disappearing. Clean.

Validated on the merged result: all 30 lint checkers, codegen 1202/0, runtime 2655/0, perry-bin 1031/0. Thanks!

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.

2 participants