Skip to content

CI: point rust-cache at the real v2.9.1 tag and label the unlabelled pins - #8005

Merged
danielhanchen merged 1 commit into
mainfrom
ci/fix-rust-cache-pin
Aug 6, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci/fix-rust-cache-pin

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Aug 6, 2026 •

Copy link
Copy Markdown
Member

Three of the four swatinem/rust-cache pins were on e18b497796c12c097a38f9edb9d0641fb99eee32 with the comment # v2.9.1.

That commit is not v2.9.1. It is an untagged commit pushed 17 seconds after the tag (update changelog, not sure why npm suddenly does not commit this). The real v2.9.1 is c19371144df3bb44fab255c43d04cbc2ab54d1c4, which security-audit.yml was already using.

To be clear about severity: nothing was compromised. It is a legitimate upstream commit and the two differ only by a changelog file. But a SHA pin whose comment names a version it is not defeats the point of the convention. The comment is the only human-readable part of the pin, so anyone auditing, reviewing, or bumping these reads it instead of resolving the hash. All four now agree.

Also in this PR

Six pins in release-desktop.yml carried no version comment at all (checkout x2, setup-node, tauri-action x3). Added, so every SHA pin in the repo is labelled.

How this was verified

Rather than eyeballing, I resolved every pinned SHA in every workflow against the upstream tag list via gh api repos/<owner>/<repo>/tags. Result: 13 actions checked, and no pin now claims a version that does not resolve to it.

The one pin still not backed by a tag is dtolnay/rust-toolchain@29eef336d9, commented # stable @ 2026-03-27. That is a branch pointer by design and is correctly documented as such, so it is left alone.

Scope

No version is upgraded here. v2.9.2 exists; moving to it is a separate decision. Existing Rust caches are not invalidated. I checked the action source rather than assuming: the cache key is built from a hardcoded literal (let key = core.getInput("prefix-key") || "v0-rust";, src/config.ts:74), with no CACHE_VERSION constant and no reference to package.json. That line is byte-identical at both SHAs, and git diff c1937114 e18b4977 is 4 added lines of CHANGELOG.md and nothing else, so the two commits are indistinguishable as an executable action.

Two other pin outliers were deliberately not changed:

  • lockfile-audit.yml uses checkout v7.0.0 and setup-python v6.3.0 where the rest of the repo is on v6.0.2 / v6.2.0. Those are newer, not stale, so converging them on the majority would be a downgrade. Bumping the other 76 call sites to v7 is a real change with its own risk and belongs in its own PR.
  • ossf.yml is the vendored upstream OpenSSF Scorecard starter workflow and tracks the pins that project ships. Diverging from it locally would make future upstream syncs noisier.

…pins

Three of the four swatinem/rust-cache pins were on
e18b497796c12c097a38f9edb9d0641fb99eee32 with the comment '# v2.9.1'.
That commit is not v2.9.1. It is an untagged commit pushed 17 seconds
after the tag ('update changelog, not sure why npm suddenly does not
commit this'). The real v2.9.1 is c19371144df3bb44fab255c43d04cbc2ab54d1c4,
which security-audit.yml was already using.

Nothing was compromised -- it is a legitimate upstream commit, and the
two differ only by a changelog file. But a SHA pin whose comment names a
version it is not defeats the point of the convention: the comment is
the only human-readable part, and anyone auditing or bumping these
reads it rather than resolving the hash. Now all four agree.

Also adds the missing '# vX.Y.Z' comment to the six pins in
release-desktop.yml that had none (checkout x2, setup-node, tauri-action
x3), so every SHA pin in the repo is now labelled with a tag that
actually resolves to it.

Verified by resolving every pinned SHA in every workflow against the
upstream tag list: 13 actions, no pin now claims a version it does not
have. The one remaining unlabelled-by-tag pin is
dtolnay/rust-toolchain@29eef336d9, commented '# stable @ 2026-03-27',
which is a branch pointer by design and correctly documented as such.

No version is upgraded here. v2.9.2 exists; moving to it is a separate
decision.
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: e37f369fea

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 58b14ab into main Aug 6, 2026
9 checks passed
@danielhanchen
danielhanchen deleted the ci/fix-rust-cache-pin branch August 6, 2026 10:23
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