Files
coder/coderd
Mathias Fredriksson 5d15ef1c98 test(coderd): hold web_search response until result is read (#32932)
Fixes a flake in `TestChatOpenAIResponsesWebSearch` (CODAGT-1636, seen
in https://github.com/coder/coder/actions/runs/44672265370) where the
test timed out waiting for the streamed `web_search` tool-result part.
The chat stream only relays live parts for a generation attempt it
observes during `Sync`; if the step commits first, the stream advances
past the attempt and delivers the committed message instead. The old
`streamReady` gate released the fake provider as soon as `StreamChat`
returned, which let the step commit before the stream synced that
attempt.

The fake provider now keeps the first streaming response open
(withholding `response.completed`) until the test reads the streamed
`web_search` result, keeping the episode uncommitted while the stream
syncs it and replays its buffered parts from `seq` 1. The `streamReady`
gate is removed.

> 🤖 Created with the help of Coder Agents.
2026-12-03 23:23:54 +11:00
..