9c377231 stopped a test binary keeping a CLI identity on disk by reading
MAGPIE_TEST_SANDBOX, which testenv.Run sets. internal/gateway isolates
itself in its own TestMain (isolatedTests) and never set it, so the
identity was still written there: CI on 9c377231 failed the ubuntu Race
shard in TestRequestTailAfterOldLimit with "directory not empty", #1524's
failure. isolatedTests now sets the marker to its home, as testenv does,
and TestRunsAsAnIsolatedTestBinary fails if it doesn't.
Ran: the new test with the Setenv removed (red: "TestMain left
MAGPIE_TEST_SANDBOX unset") and restored (green); go vet on darwin,
GOOS=linux and GOOS=windows for internal/gateway; go test -count=1
./internal/gateway/ (ok, 433s, on a machine at load ~80).