Skip to content

gate: reclaim age-expired caches via the shared disk-clean helper - #33

Merged
alanvardy merged 1 commit into
mainfrom
chore/disk-clean-gate
Sep 17, 2026
Merged

alanvardy merged 1 commit into
mainfrom
chore/disk-clean-gate

Conversation

@alanvardy

Copy link
Copy Markdown
Owner

Adds one optional line at the top of scripts/test.sh.

If a shared disk-clean helper is on PATH it reclaims age-expired build/test
caches 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/deps or
target/release — the incremental build state this gate depends on — and
never follows a symlink.

Gate

./scripts/test.sh passes on this branch (see the run in the PR
conversation for the summary line).

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.
@alanvardy
alanvardy merged commit 12cac8e into main Sep 17, 2026
3 checks passed
@alanvardy
alanvardy deleted the chore/disk-clean-gate branch September 17, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant