ci: stop node_modules cache restore-keys poisoning#40
Merged
Conversation
boris91
previously approved these changes
Jun 16, 2026
The setup-cache action saved node_modules with a restore-keys prefix fallback. On a lockfile change the new exact key misses, restore-keys matches the previous cache, and stale node_modules get restored over a fresh install and re-saved under the new key — serving outdated deps (e.g. a pinned vite bump still resolving to the old major). Dropping restore-keys here forces a clean install on any lockfile change; the restore-cache action keeps its prefix fallback for read-only speedups.
andretetherio
force-pushed
the
ci-cache-fix
branch
from
June 17, 2026 13:52
7718db8 to
915c13e
Compare
boris91
approved these changes
Jun 17, 2026
arif-dewi
approved these changes
Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
restore-keysfrom the save step of.github/actions/node-setup-cache.Why
On a lockfile change the new exact cache key misses,
restore-keysthen matches the previous cache, and stalenode_modulesget restored over the fresh install and re-saved under the new key — so CI silently runs with outdated deps (this is what let a pinned vite bump keep resolving to the old major in PR #38).Dropping
restore-keyson the save path forces a clean install whenever the lockfile changes. The companionnode-restore-cacheaction keeps its prefix fallback (read-only, safe speedup).Test plan
package-lock.json, confirm the cache key misses and a freshnpm ciruns (no stale restore).