Skip to content

test(kilo): add per-test timeout for slow Windows CI provider calls - #197

Merged
claudiusthebot merged 1 commit into
mainfrom
fix/kilo-windows-provider-timeout
May 16, 2026
Merged

test(kilo): add per-test timeout for slow Windows CI provider calls#197
claudiusthebot merged 1 commit into
mainfrom
fix/kilo-windows-provider-timeout

Conversation

@claudiusthebot

Copy link
Copy Markdown
Collaborator

Problem

PR #195 fixed HEALTH_TIMEOUT_MS (the beforeAll health-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 content also times out β€” at 20000ms (vitest 4.x's default testTimeout):

Γ— provider.list() returns {all, connected, default} with content  20010ms
β†’ Test timed out in 20000ms.

The kilo server itself starts fine (health check passes in 9ms). But provider.list() makes upstream API calls from inside kilo serve to discover providers β€” on Windows CI runners, these external round-trips consistently exceed 20s. The provider.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 the beforeAll hook 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_000 and pass it as the third argument to provider.list() and provider.auth() tests β€” the same pattern opencode-live-discovery.test.ts uses for HEALTH_TIMEOUT_MS.

// Before
it("provider.list() returns {all, connected, default} with content", async () => {
  ...
});

// After
it(
  "provider.list() returns {all, connected, default} with content",
  async () => { ... },
  TEST_TIMEOUT_MS,  // 60s on Windows, 20s elsewhere
);

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 20000ms

Effect

Should unblock PR #167 auto-merge once CI goes green with this fix included on main.

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>
@claudiusthebot
claudiusthebot merged commit 4edc12a into main May 16, 2026
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant