Repository navigation
ci(affected): update cache-strategy comment to match post-#9 behavior - #2520
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 <[email protected]>
cargo-affected #9 (treat sibling shas as reachable) and #8 (drop profraw dir post-collect) changed both halves of the contract this comment described. Refresh the comment so the next reader sees the current behavior: cache only the DB, fallback restores never widen to "run everything" unless the cache is missing entirely. Co-Authored-By: Claude <[email protected]>
Swatinem/rust-cache@v2's restore step calls `cleanTargetDir` on the workspace's `target/` whenever its own cache hit is a prefix-only match (common — its key is partly content-hashed, so non-trivial PR diffs miss the exact key). `cleanTargetDir` recursively cleans every directory under `target/`, deleting file children — including a `coverage.db` we just dropped at `target/affected/coverage.db` from the actions/cache restore that ran moments earlier. Net effect: cargo-affected's DB was being wiped between restore and read on every prefix-match rust-cache hit. End-to-end this looks like "cache restored successfully" followed by "no coverage data yet — running all tests" — selection silently disabled. Move the actions/cache restore to AFTER `./.github/actions/test-setup` (which is where rust-cache lives). rust-cache populates target/ first, we drop the DB on top, nothing else touches `target/affected/` after that point. Co-Authored-By: Claude <[email protected]>
worktrunk-bot
approved these changes
May 2, 2026
This was referenced May 2, 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.
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