Skip to content

ci(ts): 30s test timeout for the cli conformance suite (eliminate cold-start flake class)#169

Merged
dmealing merged 1 commit into
mainfrom
fix/cli-conformance-cold-start-timeout
Jul 4, 2026
Merged

ci(ts): 30s test timeout for the cli conformance suite (eliminate cold-start flake class)#169
dmealing merged 1 commit into
mainfrom
fix/cli-conformance-cold-start-timeout

Conversation

@dmealing

@dmealing dmealing commented Jul 4, 2026

Copy link
Copy Markdown
Member

gate_conf_ts runs the cli suite via cd packages/cli && bun test under bun's default 5s per-test timeout. The cli tests invoke full meta/run() dispatch, which lazily imports each command's (sometimes heavy — codegen, migrate-ts) module on first use. On a cold/contended self-hosted runner that first cold-start import can exceed 5s and flake otherwise-instant exit-code/--format tests — seen twice on the main push path (help-and-exit, index-format), each failing at ~5001ms while the whole suite runs in ~1.3s warm.

Why the CLI flag (not config): bun does not honor bunfig.toml [test] timeout — verified empirically (a 1ms config value had no effect on tests run from either cli/ or server/typescript/). So the fix is --timeout 30000 on the invocation.

30s keeps a genuine hang loud while removing the timing sensitivity for tests that assert behavior, not performance. This covers the whole cli suite (both previously-flaky files and any future cold-start-sensitive ones), not just one file. Same root cause as the sidecar readiness fix (#167) — tight timeouts tripping under host contention.

🤖 Generated with Claude Code

… flake)

gate_conf_ts runs the cli suite via `cd packages/cli && bun test` under bun's
default 5s per-test timeout. The cli tests invoke full `meta`/run() dispatch,
which lazily imports each command's (sometimes heavy: codegen, migrate-ts) module
on first use; on a cold/contended self-hosted runner that first cold-start import
can exceed 5s and flake otherwise-instant exit-code/--format tests (seen twice on
the main push path: help-and-exit and index-format, each failing at ~5001ms while
the whole suite runs in ~1.3s warm). bun does NOT honor bunfig.toml `[test]
timeout` (verified: a 1ms config value had no effect), so the fix is the
`--timeout` CLI flag on the invocation. 30s keeps a genuine hang loud while
removing the timing sensitivity. Same root cause as the sidecar readiness fix
(#167) — tight timeouts tripping under host contention.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ew1XfYSbEAezxjs9opynAe
@dmealing
dmealing merged commit 3f105c0 into main Jul 4, 2026
1 check passed
@dmealing
dmealing deleted the fix/cli-conformance-cold-start-timeout branch July 4, 2026 16:58
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