Summary
src/node/services/agentSession.queueDispatch.test.ts › "rejected queued dispatch surfaces through onAcceptedPreStreamFailure" fails intermittently in CI's Test / Unit (6/6) shard. It passes locally, 3 of 3 runs on the pinned Bun 1.3.5.
Occurrences
Both are on PR #4560, which does not touch AgentSession, at head b6e692b4a8:
- PR CI run 36151943919, job "Test / Unit (6/6)". It passed on rerun.
- Merge-group run 36156039096, job "Test / Unit (6/6)". The PR was dequeued.
Likely cause
The test spies session.sendMessage to reject, calls sendQueuedMessages(), then waits with waitForCondition(() => failures.length === 1). On a loaded CI runner the rejected dispatch probably reaches onAcceptedPreStreamFailure after waitForCondition's default bound. The fix is to await the dispatch's own settlement instead of polling.
Generated with xum • Model: anthropic:claude-opus-5-5 • Thinking: high
Summary
src/node/services/agentSession.queueDispatch.test.ts› "rejected queued dispatch surfaces through onAcceptedPreStreamFailure" fails intermittently in CI'sTest / Unit (6/6)shard. It passes locally, 3 of 3 runs on the pinned Bun 1.3.5.Occurrences
Both are on PR #4560, which does not touch AgentSession, at head
b6e692b4a8:Likely cause
The test spies
session.sendMessageto reject, callssendQueuedMessages(), then waits withwaitForCondition(() => failures.length === 1). On a loaded CI runner the rejected dispatch probably reachesonAcceptedPreStreamFailureafterwaitForCondition's default bound. The fix is to await the dispatch's own settlement instead of polling.Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high