improve: reuse Vitest transform cache across CI runs#109330
Merged
Merged
Conversation
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 17, 2026
* ci: persist Vitest transform cache * fix(ci): declare Vitest cache helpers * fix(ci): serialize Vitest cache snapshots
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.
What Problem This Solves
Node test shard jobs currently discard Vitest's filesystem module cache at job completion. Every shard therefore repeats cold transforms and imports for the shared source graph, increasing CI time and runner cost.
Why This Change Was Made
Persist the cache through Blacksmith sticky disks for trusted jobs and an actions/cache fallback elsewhere, using the same PR/protected trust scope as dependency caching. Keep shard planning unchanged. One deterministic matrix job commits the warm seed; every other job restores it read-only. Each concurrent Vitest worker receives a stable isolated directory, and the runner bounds the cache at 2 GiB by pruning oldest transform entries to 75% while preserving Vitest metadata.
User Impact
No product behavior changes. Maintainers and contributors get warmer Node shard startup across runs without concurrent cache-writer races or unbounded cache growth.
Evidence
Exact head:
0012e5ad6eff8285a8621ad6ebb60286476f2c5achecks-node-compact-large-1checks-node-compact-large-2checks-node-compact-small-16compact-large-1as the solecommit: on-changewriter and all 25 other Linux shard jobs ascommit: falsereaders. NoENOTEMPTYmatches occurred in either attempt.AI-assisted: yes. I understand the cache isolation, persistence, invalidation, single-writer, and pruning behavior in this change.