mirror of
https://github.com/coder/coder.git
synced 2026-06-03 04:58:23 +00:00
2e5c7d99c2
Fixes flaky `TestSpawnComputerUseAgentInheritsContext`. - The test inserts an Anthropic provider directly into the DB after `CreateChat` has already been called - The server's background goroutine may have already cached the provider list (OpenAI only) via `configCache.EnabledProviders()` with a 10s TTL - The direct DB insert bypasses the pubsub event that production uses to invalidate the cache - `isAnthropicConfigured()` returns the stale cached result, making `computer_use` appear unavailable - Fix: call `server.configCache.InvalidateProviders()` after the insert, mirroring what production does via pubsub CI failure: https://github.com/coder/coder/actions/runs/24829197096/job/72673070101?pr=24648 > 🤖