StepSecurity's v2.9.1 cut every target/<profile>/build entry at its last '-',
so Cargo's new build-dir layout (build/<package>/<hash>/) lost most dependency
packages from each saved entry. v2.9.3 checks the exact name first (#371 there)
and keeps the Windows path fix (#355 there) that v2.9.1 was pinned for.
The cache-version default moves to v2 once: rust-cache never replaces an
exact-key entry, so the pruned v1 entries would otherwise be restored as they
are until the lockfile changes.
The rust-cache key hashes the root [profile] tables except wasm-only ones (web, wasm-*), so a
web-profile edit no longer starts every native cache cold. A new warm-command input adds a
default-branch leg that runs only the build and saves the gate entry as soon as it succeeds,
instead of after the tests.
step-security/rust-cache v2.9.2 ships an ES-module bundle. Its bundled
minimatch 3 calls require('path'), which throws in an ES module, so it
falls back to '/' as the separator. On Windows no cache path then
matches and every save fails with "Path Validation Error". Windows legs
never saved a cache and built every dependency from scratch.
v2.9.1 is a CommonJS (ncc) bundle with the same inputs. Pin it
everywhere rust-cache is used and add a test that keeps every pin on
the action's commit and off v2.9.2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FypgCXtSjB6e5jmy9Uq7u8
Disable Rust cache saves after failed runs and resolve CARGO_TARGET_DIR relative to the checkout. Use dated FreeBSD cache entries and skip a matching same-day save. Keep inherited-target tests independent of the caller environment.
Contributor: @benandez.
Validated with the passing hosted test job, 95 focused passes plus one existing csh skip, and four inherited-target tests. Native Windows/FreeBSD VM and live cache-service execution were not claimed.
* ci: share the gate dependency-cache key and read-only restores
* fix(rust-cache): compare cache directories, not their spelling
A Windows runner spells one directory two ways: git-bash reports $HOME/.cargo as
/c/Users/x/.cargo, and a native tool or workflow input passes C:\Users\x\.cargo. The
align-environment guard compared the strings, so the first Windows caller copying the
README example exited 1 with "sets ...; drop the input". It now resolves both sides when
they exist and otherwise normalises backslashes, a drive letter and its case before
comparing. Refusing a genuinely different cargo home is unchanged.
Regressions cover both Windows spellings, a trailing separator, a drive letter in either
case, two different Windows homes, and a symlinked home that resolves to $HOME/.cargo;
the five positive cases fail against the previous guard.