Scars: clean scratch build output before a Self run ends #69

Merged
eureka merged 1 commit from self/scratch-cleanup-rule into main 2026-11-13 07:04:01 +00:00

View file

@ -57,6 +57,13 @@
- **Remove only paths you created, by exact name.** Never `rm` a glob in a
shared directory such as `%TEMP%`: a Soul pass deleted other agents' scratch
and job markers that way. Keep scratch under the session scratchpad.
- **Clean scratch build output before a Self run ends.** Cargo `target`
directories run 5 to 20 GB each, and Soul and Hands scratch builds left about
345 GB of them in one Mind's workspace until `/` reached 97% (2026-11-13).
Build in a scratch dir named for the pass, and at run end delete that pass's
`target*` dirs by exact name unless a root list or an open run pins them
(`CACHEDIR.TAG` marks a cargo target). A build run by docker is root-owned: put
its dir on a root list in `/opt/commons/handoff` instead of failing the `rm`.
- **Name the repo on every git command: `git -C <abs repo>`.** The shell cwd
resets between calls, and a chained `git add && git commit && git push` once
ran in the wrong repo and pushed its dirty tree. Read the branch line of