gate: reclaim age-expired caches via the shared disk-clean helper - #33
Merged
Merged
Conversation
Adds one optional line at the top of the gate: if a shared `disk-clean` helper is on PATH, it reclaims age-expired build/test caches before the build starts. It is a no-op when the helper is absent, so CI and other machines behave exactly as before. The helper only removes artifacts a gate regrows anyway — stale .xcresult bundles, *.testcfg files, and cargo artifact dirs idle for days on end — and it age-gates every class so a concurrently running gate's in-flight artifacts are never touched. It refuses to touch target/debug/deps or target/release, which are the incremental build state this gate depends on.
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.
Adds one optional line at the top of
scripts/test.sh.If a shared
disk-cleanhelper is on PATH it reclaims age-expired build/testcaches before the build starts — the moment reclamation is cheapest, since
nothing in this worktree is mid-build yet. When the helper is absent (CI, any
other machine) the line is a silent no-op, so a clean checkout behaves
identically.
Every class is age-gated, because gates run concurrently across worktrees and
agent sandboxes: anything younger than the window may belong to an in-flight
run and is left alone. It refuses to touch
target/debug/depsortarget/release— the incremental build state this gate depends on — andnever follows a symlink.
Gate
./scripts/test.shpasses on this branch (see the run in the PRconversation for the summary line).