Skip to content

test(cli): generous timeout on --help exit-code tests (eliminate cold-start flake)#168

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

test(cli): generous timeout on --help exit-code tests (eliminate cold-start flake)#168
dmealing merged 1 commit into
mainfrom
fix/help-test-cold-start-timeout

Conversation

@dmealing

@dmealing dmealing commented Jul 4, 2026

Copy link
Copy Markdown
Member

Eliminates the intermittent each subcommand supports --help and exits 0 failure (a 5001ms timeout) seen on the main push path.

Root cause: help-and-exit.test.ts asserts exit codes, not performance, but ran under bun's default 5s timeout. run() lazily imports each command's module on first dispatch (some heavy — migrate-ts, codegen), so the first cold-start import on a cold/contended CI runner can exceed 5s and flake the suite — even though the whole file runs in ~115ms once warm.

Fix: give these exit-code tests a 30s timeout. Keeps every assertion (and still fails loudly on a genuine hang or wrong exit code) while removing the timing sensitivity for a test that was never meant to measure performance.

Test-only change. Same "tight timeout trips under host contention" root cause as the sidecar readiness fix (#167); this clears the other place it surfaced.

🤖 Generated with Claude Code

help-and-exit.test.ts asserts exit codes, not performance, but ran under bun's
default 5s timeout. run() lazily imports each command's (sometimes heavy:
migrate-ts, codegen) module on first dispatch, so the first cold-start import on a
cold/contended CI runner can exceed 5s and flake the suite — even though the whole
file runs in ~115ms once warm. Give these tests a 30s timeout: keeps the exit-code
assertions and still fails loudly on a genuine hang, but removes the timing
sensitivity. (Surfaced as an intermittent 5001ms failure of 'each subcommand
supports --help and exits 0' on the main push path.)

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