Conversation
…idStream against CI flakes Three changes to eliminate the timing-sensitive flake: 1. Change PendingChatAcquireInterval from time.Hour to time.Second. The primary trigger is still signalWake() from SendMessage, but a short fallback poll ensures the worker picks up the pending chat even under heavy CI goroutine scheduling contention. 2. Increase context timeout from WaitLong (25s) to WaitSuperLong (60s). The worker pipeline (model resolution, message loading, LLM call) involves multiple DB round-trips that can be slow when the PostgreSQL instance is shared with many parallel test packages. 3. Add a status-polling loop while waiting for the streaming request. If the worker errors out during chat processing, the test now fails immediately with the error status and message instead of silently timing out after 60 seconds. Fixes coder/internal#1455
sreya
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes coder/internal#1455
Three changes to eliminate the timing-sensitive flake in
TestSubscribeRelayEstablishedMidStream:Reduce
PendingChatAcquireIntervalfromtime.Hourtotime.Second.The primary trigger is still
signalWake()fromSendMessage, but ashort fallback poll ensures the worker picks up the pending chat
even under heavy CI goroutine scheduling contention.
Increase context timeout from
WaitLong(25s) toWaitSuperLong(60s).The worker pipeline (model resolution, message loading, LLM call)
involves multiple DB round-trips that can be slow when PostgreSQL
is shared with many parallel test packages.
Add a status-polling loop while waiting for the streaming request.
If the worker errors out during chat processing, the test now
fails immediately with the error status and message instead of
silently timing out.