What happened
Staging Full check run 35361622004 (attempt 1) on 62cae8580, job full tests 1/3, 2026-09-18:
--- FAIL: TestAGroundedTaskLandsWithoutMergingItsInheritance (0.10s)
testing.go:1464: TempDir RemoveAll cleanup: unlinkat /tmp/codeaf-ci/TestAGroundedTaskLandsWithoutMergingItsInheritance292363338/001/.git: directory not empty
FAIL
FAIL github.com/Agent-Field/codeaf/internal/session 190.682s
The test's own assertions passed; the failure is t.TempDir's cleanup finding something still writing into the fixture repository's .git after the test returned. The workflow_dispatch Full check on the same commit (35359839277) was green, and the job was green on rerun (attempt 2). That is the shape docs/rules/ci.md names — a test that fails only beside the rest of the suite — and per that page it is a bug report, not a rerun.
Replication
Deterministic (no model). On the bench host, starve the box and repeat the one test:
yes > /dev/null & yes > /dev/null &
GOMAXPROCS=2 go test -count=30 -run '^TestAGroundedTaskLandsWithoutMergingItsInheritance$' ./internal/session/
kill %1 %2
What a developer sees today on a quiet laptop: ok every time; the race needs the scheduler to hand the cleanup its turn before a git child has exited.
Field (real models). Not needed.
Where
internal/session/groundladder_test.go, TestAGroundedTaskLandsWithoutMergingItsInheritance; the landing road it drives runs git in the fixture repository. The likely writer is a git child still running at cleanup — gc --auto/maintenance spawned by a commit or a fetch, or the landing's own last command not yet reaped.
The fix
The test waits on the fact — every git child of the landing has exited (or the fixture repository is created with gc.auto=0 and maintenance off) — before it returns to cleanup. Never a retry, never a wider timeout.
Acceptance
The starved -count=30 loop above is green, and full tests on the next promotions stays green without a rerun.
What happened
Staging
Full checkrun 35361622004 (attempt 1) on62cae8580, jobfull tests 1/3, 2026-09-18:The test's own assertions passed; the failure is
t.TempDir's cleanup finding something still writing into the fixture repository's.gitafter the test returned. Theworkflow_dispatchFull check on the same commit (35359839277) was green, and the job was green on rerun (attempt 2). That is the shapedocs/rules/ci.mdnames — a test that fails only beside the rest of the suite — and per that page it is a bug report, not a rerun.Replication
Deterministic (no model). On the bench host, starve the box and repeat the one test:
What a developer sees today on a quiet laptop:
okevery time; the race needs the scheduler to hand the cleanup its turn before a git child has exited.Field (real models). Not needed.
Where
internal/session/groundladder_test.go,TestAGroundedTaskLandsWithoutMergingItsInheritance; the landing road it drives runs git in the fixture repository. The likely writer is a git child still running at cleanup —gc --auto/maintenance spawned by a commit or a fetch, or the landing's own last command not yet reaped.The fix
The test waits on the fact — every git child of the landing has exited (or the fixture repository is created with
gc.auto=0and maintenance off) — before it returns to cleanup. Never a retry, never a wider timeout.Acceptance
The starved
-count=30loop above is green, andfull testson the next promotions stays green without a rerun.