Files
buzz/scripts
Matt Toohey 158b3bf562 test(scripts): stop file-size fixtures leaking git repos and fsmonitor daemons (#8727)
## Summary

The file-size ratchet tests (`scripts/check-file-sizes-core.test.mjs`,
run by `just file-size-check`) created fixture git repos under the OS
tmpdir and never deleted them. When `core.fsmonitor=true` is set
globally, every git call in a fixture also started a `git
fsmonitor--daemon` that never exited. So every run left more temp repos
and more daemons behind.

- The test's `git()` helper now passes `-c core.fsmonitor=false`, next
to the existing `core.hooksPath` override.
- Fixture repos are now created through a new `createFixtureRepo()`
helper, which records each path. An `after()` hook deletes them all with
`rmSync(..., { recursive: true, force: true })`.

The other scripts that create temp git repos
(`scripts/ci-selection.test.mjs`, `scripts/flake-check.test.mjs`,
`scripts/test-mobile-release-contract.sh`,
`scripts/test-sprig-image.sh`) already clean up their temp directories
and left no daemons running, so they are unchanged.

## Testing

- `node --test scripts/check-file-sizes-core.test.mjs`: no `file-size-*`
directories are left in the tmpdir afterwards, and no new
`fsmonitor--daemon` processes are running.
- The pre-push `file-size-check` lane passes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Matt Toohey <contact@matttoohey.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 14:37:38 +11:00
..