Pin Git Background GC Off in Test Environment · Entire
What it does: Pins git background gc/maintenance off in the isolated test env (GitIsolatedEnv/IsolateGitConfigEnv), so a detached git gc can't outlive a test holding .git/objects open and race t.TempDir() cleanup.
- Central fix — applied via the shared isolation config file, so every git-shelling strategy test benefits, not just the one flaking.
- Verified locally:
go test -run TestSafelyAdvanceLocalRef -count=50 -p 4→ green. - Tradeoff: didn't run
mise run lint/test:cilocally (you interrupted to push) — CI will catch fmt/lint. The change is a small string write in one helper, low risk.
72ac486test: pin git background gc off in isolated test env (COR-394)\ \ GitIsolatedEnv/IsolateGitConfigEnv now point git at a config that\ disables gc.auto, gc.autoDetach, maintenance.auto, and\ fetch.writeCommitGraph. A detached `git gc`/`git maintenance` process\ could outlive a test while still holding .git/objects open, racing\ t.TempDir()'s deferred RemoveAll and failing with "directory not empty".\ \ Fixes flaky TestSafelyAdvanceLocalRef_DoesNotReplayDisconnectedChainWhenTargetIsShallow;\ applied centrally so other git-shelling strategy tests don't regress.\ \ Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com\ Entire-Checkpoint: c57ad18d4e04+15/-4