Repository navigation
ci(affected): cache only coverage.db, not full target/affected - #2517
Merged
Merged
Conversation
cargo-affected leaves per-collect profraw bundles in `target/affected/profraw-<PID>/` (~5 GB on this repo). Caching the parent dir ships those into the GitHub Actions cache, where a single collect saturates the 10 GB repo cap and evicts every other cache — so PRs miss both the exact-match and prefix-fallback restore keys and fall back to running the full suite. Narrow both save and restore to `target/affected/coverage.db` (~225 MB). Cleaning up the profraw bundles themselves is a separate follow-up in cargo-affected; until then this keeps the cached payload small enough for multiple collects to coexist. Co-Authored-By: Claude <noreply@anthropic.com>
worktrunk-bot
approved these changes
May 1, 2026
max-sixty
added a commit
that referenced
this pull request
May 2, 2026
…#2520) Comment-only follow-up to #2517 and the cargo-affected sibling-reachable change (max-sixty/cargo-affected#9). The cache-strategy comment in the workflow still described the old "fallback widens to all tests" semantics; it now describes the current behavior — sibling collect_shas drive normal selection, full-suite widening fires only when no cache exists at all. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com>
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
cargo-affected leaves per-collect profraw bundles (~5 GB on this repo) in
target/affected/profraw-<PID>/. The CI cache was saving the parent dir, so a single collect saturates the 10 GB repo cache cap and evicts every other cache — which is why PRs were missing both the exact-match and prefix-fallback keys and falling back to the full suite.Narrow save/restore to
target/affected/coverage.db(~225 MB). With this, multiple main-collect caches can coexist and PRs are far more likely to hit the prefix-fallback.Cleaning up the profraw bundles inside cargo-affected itself is a separate follow-up (also benefits local devs whose
target/affected/currently grows by 13 GB percargo affected collectuntil theycargo clean).Test plan
🤖 Generated with Claude Code