Problem
clean-build.sh + clean-caches.sh run one full-tree find per pattern (7 CLEAN_BUILD_DIR_NAMES + 1 build glob + 1 cache dir name + 1 cache glob ≈ 10 walks per repo), and the ! -path exclusions only filter output — they do not -prune, so every walk still descends .git/, node_modules/, .venv/.
Measured
Same large repo (medley, .NET + node), same machine (Windows/NTFS):
| Approach |
Time |
single find with -prune + -o alternation, incl. du sizes |
16.7 s |
| skill dry-run (10 walks, unpruned) |
>10 min (killed, never finished) |
Dry-run alone exceeded the 120 s Bash timeout; a fleet sweep pays this per repo, then pays it again at --apply (gate flow enumerates twice; see manifest issue).
Fix direction
Single walk: find ROOT \( -name .git -o -name node_modules -o -name .venv \) -prune -o \( -type d \( -name bin -o … \) -o -type f \( -name '*.binlog' -o … \) \) -print, then apply per-path protections on the result list.
Problem
clean-build.sh+clean-caches.shrun one full-treefindper pattern (7CLEAN_BUILD_DIR_NAMES+ 1 build glob + 1 cache dir name + 1 cache glob ≈ 10 walks per repo), and the! -pathexclusions only filter output — they do not-prune, so every walk still descends.git/,node_modules/,.venv/.Measured
Same large repo (medley, .NET + node), same machine (Windows/NTFS):
findwith-prune+-oalternation, incl.dusizesDry-run alone exceeded the 120 s Bash timeout; a fleet sweep pays this per repo, then pays it again at
--apply(gate flow enumerates twice; see manifest issue).Fix direction
Single walk:
find ROOT \( -name .git -o -name node_modules -o -name .venv \) -prune -o \( -type d \( -name bin -o … \) -o -type f \( -name '*.binlog' -o … \) \) -print, then apply per-path protections on the result list.