test(kilo): add per-test timeout for slow Windows CI provider calls - #197
Merged
Conversation
provider.list() and provider.auth() make upstream API calls from inside kilo serve to discover providers. On Windows CI runners, these external round-trips can exceed vitest 4.x's 20s default testTimeout. PR #195 fixed the beforeAll health-check timeout (server startup). This fixes the individual test timeout for the two network-heavy tests that still time out afterward. Add TEST_TIMEOUT_MS = process.platform === 'win32' ? 60_000 : 20_000 and pass it as the third argument to provider.list() and provider.auth() tests (same pattern opencode-live-discovery.test.ts uses for HEALTH_TIMEOUT_MS). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8 tasks
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
PR #195 fixed
HEALTH_TIMEOUT_MS(thebeforeAllhealth-check loop), which extended kilo serve's startup window from 15s β 120s on Windows CI.That wasn't the only timeout. The individual test
provider.list() returns {all, connected, default} with contentalso times out β at 20000ms (vitest 4.x's defaulttestTimeout):The kilo server itself starts fine (health check passes in 9ms). But
provider.list()makes upstream API calls from insidekilo serveto discover providers β on Windows CI runners, these external round-trips consistently exceed 20s. Theprovider.auth()test is also at risk (14476ms in the same run β close to the limit).Root cause
The per-test timeout (
testTimeout) is separate from thebeforeAllhook timeout. PR #195 only extended the latter. Each slow test needs its own timeout argument.Fix
Add
TEST_TIMEOUT_MS = process.platform === "win32" ? 60_000 : 20_000and pass it as the third argument toprovider.list()andprovider.auth()tests β the same patternopencode-live-discovery.test.tsuses forHEALTH_TIMEOUT_MS.No behaviour change on Linux/macOS (still 20s, same as vitest default).
Evidence
CI run 25968455011 on PR #167 (triggered after #195 merged):
Backend Live (kilo, ubuntu-latest)βBackend Live (kilo, macos-latest)βBackend Live (kilo, windows-latest)β βprovider.list()timed out at exactly 20000msEffect
Should unblock PR #167 auto-merge once CI goes green with this fix included on main.