Problem
scan.sh shares the exact unpruned per-pattern find walk pattern that #993 removed from clean-build.sh / clean-caches.sh: one full-tree find per cache/build pattern, with ! -path filters that do not -prune, so every walk still descends .git/, node_modules/, .venv/.
#993 introduced a shared clean_enumerate single-pruned-walk engine in lib/clean-common.sh but scoped the change to the two mutating scripts named in that issue. scan.sh was intentionally left on the old pattern to avoid scope creep, leaving two parallel enumeration ways in the same skill.
Fix direction
Migrate scan.sh onto clean_enumerate / clean_caches_candidates / clean_build_candidates so the read-only inventory shares the single-pruned-walk engine and the skill has one enumeration way. Read-only tier, so no manifest/apply surface — just the walk.
Referenced by a TODO(#…) at the enumeration engine in lib/clean-common.sh.
Problem
scan.shshares the exact unpruned per-patternfindwalk pattern that #993 removed fromclean-build.sh/clean-caches.sh: one full-treefindper cache/build pattern, with! -pathfilters that do not-prune, so every walk still descends.git/,node_modules/,.venv/.#993 introduced a shared
clean_enumeratesingle-pruned-walk engine inlib/clean-common.shbut scoped the change to the two mutating scripts named in that issue.scan.shwas intentionally left on the old pattern to avoid scope creep, leaving two parallel enumeration ways in the same skill.Fix direction
Migrate
scan.shontoclean_enumerate/clean_caches_candidates/clean_build_candidatesso the read-only inventory shares the single-pruned-walk engine and the skill has one enumeration way. Read-only tier, so no manifest/apply surface — just the walk.Referenced by a
TODO(#…)at the enumeration engine inlib/clean-common.sh.