Repository navigation
test(concurrent): pin that a sync slot waiter abandons when its request ends - #152
Conversation
…st ends Under DispatchSync with the concurrent strategy, a request waiting inline for a MaxConcurrent slot must give up when its context ends: it returns 200, logs the abandoned wait, records an ignored outcome, and never runs its handler, even after the slot frees. Closes #151 Signed-off-by: Thomas Kosiewski <tk@coder.com>
|
@codex review |
|
@codex security review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🎉 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🛡️ Codex Security ReviewSecurity review completed. No security issues were found in this pull request. Reviewed commit: Only the user who started this review can view the report in Codex. ℹ️ About Codex security reviews in GitHubThis is an experimental Codex feature. Security reviews are triggered when:
Once complete, Codex will leave suggestions, or a comment if no findings are found. |
Why
No test pinned that a
DispatchSyncrequest waiting for a concurrency slot gives up when its request context ends. A change that made the abandon branch wait for the slot and run the handler anyway passed the whole root suite. This PR adds the missing test. Closes #151.What changed
TestConcurrentSyncSlotWaiterAbandonedWhenRequestEndsinconcurrent_test.go. The only slot stays held. The test cancels the waiter's request context and asserts that the request returns 200, the handler never runs (also after the slot frees), the abandoned wait is logged for that event, and the observer recordsignored.Scope
Verification
go test -race -run '^TestConcurrentSyncSlotWaiterAbandonedWhenRequestEnds$' -count=50 .passes. The full root suite passes under-race.ctx.Done()branch ofacquireConcurrencySlottoc.concurrencySlots <- struct{}{}; return true. The new test then fails:Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high