From aaaa58ff802c0757b707dbe170c0810a69f52b7c Mon Sep 17 00:00:00 2001 From: Marcos Paulo Date: Wed, 21 Oct 2026 20:51:13 -0300 Subject: [PATCH] docs: build hygiene covers test temp dirs and baseline copies Co-Authored-By: Claude Sonnet 5.5 --- .claude/rules/build-hygiene.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.claude/rules/build-hygiene.md b/.claude/rules/build-hygiene.md index 24c6645..bf8eba7 100644 --- a/.claude/rules/build-hygiene.md +++ b/.claude/rules/build-hygiene.md @@ -5,3 +5,4 @@ Disk is a shared, finite resource: a full system volume (`/private/tmp`) stops e - The lead deletes all `target/agent-*` and scratch copies after each commit with `scripts/clean-agent-builds.sh`. Never delete a dir that a running agent uses. - Before a long build run `df -h /System/Volumes/Data /Volumes/Storage`; under 20 GiB free on either: stop and clean first. Never write build output, copies or logs to the Data volume when `/Volumes/Storage` has room. - `scripts/` is gitignored (local agent tooling): the helper `scripts/clean-agent-builds.sh` lives there and in `~/.agents/scripts/`; if it is missing, do the same by hand (delete your `target/agent-` and scratch copy). +- Tests must delete the temp dirs they create (guard with `Drop`/`tempfile`-style cleanup; `std::env::temp_dir()` leaks otherwise: 21k `nc-*`/`notescraft-*` dirs ate 5 GB of the system volume). Never make a full copy of the repo or a baseline checkout in `$TMPDIR`/`/private/tmp`; copy to `/Volumes/Storage` (a baseline copy in `$TMPDIR/opencode/nc-fonts-before` took 4.7 GB). `scripts/clean-agent-builds.sh` purges `nc-*`/`notescraft-*` in `$TMPDIR`.