From 00a316e3e11dee62b84202f01a5ffa7d880510ed Mon Sep 17 00:00:00 2001 From: Alan Vardy Date: Wed, 16 Sep 2026 08:19:17 -0700 Subject: [PATCH] gate: reclaim age-expired caches via the shared disk-clean helper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- scripts/test.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/test.sh b/scripts/test.sh index c88b374..ece78b1 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,6 +1,10 @@ #!/usr/bin/env bash set -euo pipefail +# Reclaim age-expired build/test caches before building. No-op when the shared +# helper is not installed, so CI and other machines are unaffected. +command -v disk-clean >/dev/null 2>&1 && disk-clean || true + echo "=== fmt ===" cargo fmt --all