release/2026-10-06c failed Gitea CI on the pull_request run (run 468 / job 6104) at the release head: --- FAIL: TestFetchCanceledWaitHoldsNoSlot with burst Fetch 2 error = Get "...": EOF, want context.DeadlineExceeded. The same commit's push run passed, so it is a real-clock flake.
Done-condition
TestFetchCanceledWaitHoldsNoSlot is deterministic (no real-clock timing / racing burst vs deadline) while preserving the asserted rate-limit/cancellation behaviour; proven with repeated -race runs; full go test -race passes; incorporated into dev and the release branch.
Change
internal/recipes test deflaked (deterministic clock-based assertions); the production rate limiter is unchanged.
Evidence
go test -race -count=1000 -run 'TestFetchCanceledWaitHoldsNoSlot$' ./internal/recipes/ -> ok, 0 failures.
go test -race -count=50 ./internal/recipes/ -> ok, 0 failures.
gofmt empty; go vet ./...; CGO_ENABLED=0 go build ./...; go test -race -count=1 ./... all pass.
Note for follow-up (not this task): TestReleaseWakesWaiter still uses the real clock with a 500ms margin and could flake; and a caller cancelled mid-wait may surface a network error instead of context.Canceled.
Maestro task: 73e54394-0c57-444d-bd5a-a14ca76dd9e8 (Feature 10 release correction).
## Why
release/2026-10-06c failed Gitea CI on the pull_request run (run 468 / job 6104) at the release head: `--- FAIL: TestFetchCanceledWaitHoldsNoSlot` with `burst Fetch 2 error = Get "...": EOF, want context.DeadlineExceeded`. The same commit's push run passed, so it is a real-clock flake.
## Done-condition
TestFetchCanceledWaitHoldsNoSlot is deterministic (no real-clock timing / racing burst vs deadline) while preserving the asserted rate-limit/cancellation behaviour; proven with repeated -race runs; full go test -race passes; incorporated into dev and the release branch.
## Change
internal/recipes test deflaked (deterministic clock-based assertions); the production rate limiter is unchanged.
## Evidence
- `go test -race -count=1000 -run 'TestFetchCanceledWaitHoldsNoSlot$' ./internal/recipes/` -> ok, 0 failures.
- `go test -race -count=50 ./internal/recipes/` -> ok, 0 failures.
- gofmt empty; go vet ./...; CGO_ENABLED=0 go build ./...; go test -race -count=1 ./... all pass.
Note for follow-up (not this task): TestReleaseWakesWaiter still uses the real clock with a 500ms margin and could flake; and a caller cancelled mid-wait may surface a network error instead of context.Canceled.
The burst of canceled waits went through Fetch, where net/http races the
failed first write against its read loop on the torn-down connection, so
the error returned was sometimes EOF or "use of closed network
connection" instead of context.DeadlineExceeded (release/2026-10-06c
pull_request CI, run 468 / job 6104).
Drive the burst through waitTurn, the wait turnConn's first Write makes,
which returns the wait's error directly. Advance the fake clock during
the burst and check the host's slot is still the first send, so a slot
leaked by a canceled wait now fails the test; the request after the
burst still goes out exactly HostInterval after the first send with no
wait. Production code is unchanged.
Maestro: 73e54394-0c57-444d-bd5a-a14ca76dd9e8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The burst of canceled waits went through Fetch, where net/http races the
failed first write against its read loop on the torn-down connection, so
the error returned was sometimes EOF or "use of closed network
connection" instead of context.DeadlineExceeded (release/2026-10-06c
pull_request CI, run 468 / job 6104).
Drive the burst through waitTurn, the wait turnConn's first Write makes,
which returns the wait's error directly. Advance the fake clock during
the burst and check the host's slot is still the first send, so a slot
leaked by a canceled wait now fails the test; the request after the
burst still goes out exactly HostInterval after the first send with no
wait. Production code is unchanged.
Maestro: 73e54394-0c57-444d-bd5a-a14ca76dd9e8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Maestro task: 73e54394-0c57-444d-bd5a-a14ca76dd9e8 (Feature 10 release correction).
Why
release/2026-10-06c failed Gitea CI on the pull_request run (run 468 / job 6104) at the release head:
--- FAIL: TestFetchCanceledWaitHoldsNoSlotwithburst Fetch 2 error = Get "...": EOF, want context.DeadlineExceeded. The same commit's push run passed, so it is a real-clock flake.Done-condition
TestFetchCanceledWaitHoldsNoSlot is deterministic (no real-clock timing / racing burst vs deadline) while preserving the asserted rate-limit/cancellation behaviour; proven with repeated -race runs; full go test -race passes; incorporated into dev and the release branch.
Change
internal/recipes test deflaked (deterministic clock-based assertions); the production rate limiter is unchanged.
Evidence
go test -race -count=1000 -run 'TestFetchCanceledWaitHoldsNoSlot$' ./internal/recipes/-> ok, 0 failures.go test -race -count=50 ./internal/recipes/-> ok, 0 failures.Note for follow-up (not this task): TestReleaseWakesWaiter still uses the real clock with a 500ms margin and could flake; and a caller cancelled mid-wait may surface a network error instead of context.Canceled.
Independent Codex gpt-6-sol review: APPROVED for this exact commit.
orchestrator-agent referenced this pull request2026-10-06 21:28:52 -04:00