Skip to content

ci: SHA-pin Swatinem/rust-cache + cache-on-failure:false + shared-cache:true#36

Merged
Emmyt24 merged 1 commit into
Octo-Protocol-org:mainfrom
Senorespecial:fix/ci/rust-cache-pin
Jun 28, 2026
Merged

ci: SHA-pin Swatinem/rust-cache + cache-on-failure:false + shared-cache:true#36
Emmyt24 merged 1 commit into
Octo-Protocol-org:mainfrom
Senorespecial:fix/ci/rust-cache-pin

Conversation

@Senorespecial

Copy link
Copy Markdown
Contributor

Summary

Replaces the moving major tag Swatinem/rust-cache@v2 with the SHA of v2.9.1 (23869a5b) and adds:

  • cache-on-failure: false – never persist a poisoned cache from a failed job; the warm-cache vector was the leading hypothesis for why PR ci: pin rust-toolchain action to @v1 and pass toolchain: 1.84.1 explicitly #35 kept failing identically across two clean runs (failing with target triple in channel name).
  • shared-cache: true – reuse the main-branch cache for PR builds so warm caches start from a known-good baseline rather than a fresh per-PR reproduction.

Diagnostic Eviction

After #34 (--locked) and #35 (dtolnay/rust-toolchain@v1 + with.toolchain:1.84.1), PR #35\u2019s CI still produces the same canonical error across two consecutive clean runs (runs 27946370482 and 27946703145). That rules out a pure transient cache hit on the toolchain action. The remaining surface is the cache layer itself persisting a poisoned rustup state across jobs and PRs.

This PR pins the cache action to a known-good release SHA and turns off the failure-time cache save so a broken cache can no longer survive between jobs.

Companion PRs

Verification

Once this merges, PR #34 and PR #35 should flip green end-to-end, which would finally exercise cargo test --workspace --locked and cargo clippy --workspace --all-targets --locked -- -D warnings in CI (the lockfile-parity gap). PR #31 (feat/dashboard/sponsor-card) is also gated on the same upstream CI blocker.

Risk

  • Action SHA stays reproducible – pinning to 23869a5b (v2.9.1) locks the cache action\u2019s behaviour to a known-good release, eliminating the moving-major-tag drift risk that bit ci: pin rust-toolchain action to @v1 and pass toolchain: 1.84.1 explicitly #35.
  • shared-cache: true increases cache hit rate but also broadens the keys; combined with cache-on-failure: false we\u2019re protected from poisoning but PRs will now share the main-branch cache, which is the intended behaviour for fast PR builds.

…red-cache:true

Replaces the moving major tag `Swatinem/rust-cache@v2` with the SHA of the latest
v2.x release (v2.9.1 = 23869a5b) and adds:
- cache-on-failure: false  – never persist a poisoned cache from a failed job; the
                             warm-cache vector was the leading hypothesis for why
                             PR Octo-Protocol-org#35 kept failing identically across two clean
                             runs (target triple in channel name).
- shared-cache: true       – reuse the main-branch cache for PR builds so warm
                             caches start from a known-good baseline rather than
                             a fresh per-PR reproduction.

This seals the cache layer leak that Octo-Protocol-org#34 (--locked) and Octo-Protocol-org#35 (@v1 + toolchain
pin) alone did not. Cross-links:
  closes Octo-Protocol-org#33
  validates/refines Octo-Protocol-org#34 (Senorespecial:fix/ci/lockfile-locked)
  builds on Octo-Protocol-org#35 (Senorespecial:fix/ci/rust-toolchain-v1)
@Emmyt24 Emmyt24 merged commit 69a8f79 into Octo-Protocol-org:main Jun 28, 2026
0 of 4 checks passed
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