Skip to content

test(cli): size multi-spawn CLI test timeouts by spawn count - #273

Merged
ElbertePlinio merged 6 commits into
mainfrom
fix/249-cli-spawn-timeouts
Oct 6, 2026
Merged

ElbertePlinio merged 6 commits into
mainfrom
fix/249-cli-spawn-timeouts

Conversation

@ElbertePlinio

Copy link
Copy Markdown
Member

CLI tests that start the built CLI more than once now get a timeout sized by how many times they start it. The new packages/cli/test/spawn-timeout.ts gives each start 10 s through cliSpawnTimeout(n), which keeps the 30 s from #246 for its three-start test. The change covers every multi-start test in agents, commands, artifacts-export, session-status, desktop-windows, cli and mcp-stdio-conformance. Tests that already had a longer timeout keep it unless the new size is larger. No assertion, product code or global timeout changed. Single-start tests keep vitest's 5 s default, because they measured 1.4 to 2.1 s under the same load.

The viewer-mode test's 8 s bound is a product-latency assertion, not a test timeout, so it is filed separately as #259.

Closes #249

Requirement Verification Scenario Result Evidence
Audit multi-start CLI tests and size their timeouts by start count Script audit plus manual count Every CLI test file that starts the built CLI Each multi-start test uses cliSpawnTimeout(n) 249/audit-before.txt, 249/spec-*.json
Repeat-run evidence under load: agents tests Automated, 3 runs each Pinned to 2 CPUs with 8 busy loops, load 11 to 24 Before: 8 failures in 3 runs. After: 0 249/before-agents/, 249/after-agents/
Repeat-run evidence under load: other CLI files Automated, 3 runs each Same load Before: 37 failures in 3 runs. After: 0 249/before-others/, 249/after-others/
Full suite bun run test:coverage Final head 2901 tests pass, thresholds met 249/lead-final-coverage.log

Evidence lives in ~/Artifacts/pickforge-kickoff-2026-10-06/ on the dev host. The QA pass was skipped because this is a test-only change with nothing to drive.

@ElbertePlinio
ElbertePlinio merged commit ca0232a into main Oct 6, 2026
10 checks passed
@ElbertePlinio
ElbertePlinio deleted the fix/249-cli-spawn-timeouts branch October 6, 2026 15:20
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.

test: CLI multi-spawn tests time out at the 5 s default under load

1 participant