sloproxy

test(antigravity): clear credits state in place to fix a cleanup data race master

resetAntigravityCreditsRetryState assigned a fresh sync.Map to each package-level credits variable. Credits hint refreshes run on background goroutines that outlive the request, so they can still be writing those maps when a test's cleanup runs. Replacing the variable is an unsynchronized write to the same memory the goroutine is mutating, which made `go test -race ./internal/runtime/executor` fail with two data races in TestAntigravityExecute_NoCreditsWithoutConductorFlag. Empty each map in place with sync.Map.Clear instead. Clear is safe against concurrent users, and the reset semantics are unchanged. The races were pre-existing and reproduce identically on b921b5d0; only test code changes here. Production code never assigned these variables, so it was never affected. before go test -race ./internal/runtime/executor FAIL, 2 data races after go test -race ./internal/runtime/executor ok, 0 data races


+9 -4
1 changed file