CI failure details
Failure evidence
=== FAIL: coderd TestRegenerateChatTitle/PasteOnlyChat (3.64s)
...
coderd.aibridged.pool: route not supported
path=/test-openai-c2fd95bc-df90-4e1c-911a-d11d8d5a06b6/v1/responses
method=POST
...
exp_chats_test.go:9733:
Error: POST .../title/regenerate: unexpected status code 500:
Failed to regenerate chat title.
Error: generate manual title: generate structured title: not found:
route not supported: POST /test-openai-c2fd95bc-df90-4e1c-911a-d11d8d5a06b6/v1/responses
Error analysis
The test creates an OpenAI provider/model config and immediately calls RegenerateChatTitle. The in-process AI Gateway pool had just logged provider_count=0; its asynchronous provider snapshot reload had not incorporated the newly created route before the title request arrived. The request therefore hit the generated provider path before that route existed and returned HTTP 500.
The test helper createAdditionalChatModelConfigWithModelConfig waits for the HTTP create operation, but it does not synchronize with the AI Gateway pool reload. Because PasteOnlyChat runs in parallel, timing determines whether the route is ready.
Root cause
Classification: flaky test / asynchronous AI Gateway route-registration race. This is not caused by the commit under test.
No WARNING: DATA RACE, panic, OOM, resource-exhaustion, or abnormal process-termination evidence was present. This was a non-race test job and the test process completed normally with two distinct assertion failures in the overall run.
Assignment analysis
Intended blame/history commands:
git blame -L 9721,9741 coderd/exp_chats_test.go
git log --oneline -10 --follow coderd/exp_chats_test.go
TestRegenerateChatTitle/PasteOnlyChat, seedPasteOnlyTitleSourceMessage, and the paste-aware manual title path were introduced by 2ad5af5b54d9b371d9b7e9d17657fe2cec73d111 (fix(coderd): use pasted-text attachments as chat title input) by Michael Suchacz. Assigning to ibetitsmike as the test/function owner. The failing run author is unrelated.
Duplicate search
No matching issue was found after searches for:
TestRegenerateChatTitle/PasteOnlyChat
TestRegenerateChatTitle
route not supported + title
exp_chats_test.go + regenerate
- related panic/OOM/process-crash and data-race signatures
Related but different failure mode: #1481 (TestRegenerateChatTitle/RegenerationFailure, status wait timeout).
Suggested fix direction
After creating/updating the AI provider and model config, wait until the in-process AI Gateway pool has reloaded the provider route before invoking title generation, or construct this test with a synchronously registered route/fake transport.
Reproduction
go test ./coderd -run 'TestRegenerateChatTitle/PasteOnlyChat' -count=100
CI failure details
test-go-pg (macos-latest))27948866887bfaf1ee2d43f3d5374ab1153e6704by Jake Howell — coder/coder@2794886Failure evidence
Error analysis
The test creates an OpenAI provider/model config and immediately calls
RegenerateChatTitle. The in-process AI Gateway pool had just loggedprovider_count=0; its asynchronous provider snapshot reload had not incorporated the newly created route before the title request arrived. The request therefore hit the generated provider path before that route existed and returned HTTP 500.The test helper
createAdditionalChatModelConfigWithModelConfigwaits for the HTTP create operation, but it does not synchronize with the AI Gateway pool reload. BecausePasteOnlyChatruns in parallel, timing determines whether the route is ready.Root cause
Classification: flaky test / asynchronous AI Gateway route-registration race. This is not caused by the commit under test.
No
WARNING: DATA RACE, panic, OOM, resource-exhaustion, or abnormal process-termination evidence was present. This was a non-race test job and the test process completed normally with two distinct assertion failures in the overall run.Assignment analysis
Intended blame/history commands:
TestRegenerateChatTitle/PasteOnlyChat,seedPasteOnlyTitleSourceMessage, and the paste-aware manual title path were introduced by2ad5af5b54d9b371d9b7e9d17657fe2cec73d111(fix(coderd): use pasted-text attachments as chat title input) by Michael Suchacz. Assigning toibetitsmikeas the test/function owner. The failing run author is unrelated.Duplicate search
No matching issue was found after searches for:
TestRegenerateChatTitle/PasteOnlyChatTestRegenerateChatTitleroute not supported+ titleexp_chats_test.go+ regenerateRelated but different failure mode: #1481 (
TestRegenerateChatTitle/RegenerationFailure, status wait timeout).Suggested fix direction
After creating/updating the AI provider and model config, wait until the in-process AI Gateway pool has reloaded the provider route before invoking title generation, or construct this test with a synchronously registered route/fake transport.
Reproduction