Skip to content

test(cli): size the browser profile tests by spawn count - #448

Merged
ElbertePlinio merged 3 commits into
mainfrom
test/436-cli-spawn-timeouts
Oct 29, 2026
Merged

ElbertePlinio merged 3 commits into
mainfrom
test/436-cli-spawn-timeouts

Conversation

@ElbertePlinio

Copy link
Copy Markdown
Member

Closes #436

The two browser profile tests in packages/cli/test/browser-session.test.ts start the built CLI twice and kept vitest's 5 s default. They now use cliSpawnTimeout(2), as #249 did for the other multi-start CLI tests. "reports unsafe profiles while listing healthy profiles in text and JSON" is the one the issue names. "rejects invalid names and profiles on other session types" also starts the CLI twice with the default, so it gets the same size. The named profile lifecycle test starts it nine times and had a fixed 60 s; it now gets cliSpawnTimeout(9), as #249's rule keeps the larger of the two.

The agents case (agents.test.ts, "surfaces unrelated claude mcp add failures") starts the CLI once. Under the #249 load recipe it took 0.7 to 0.9 s and never timed out in 9 runs, so it keeps the default, as #249 decided for single-start tests.

Traceability

Requirement Verification Scenario and edge cases Result Evidence
Size the browser profile test's timeout by its spawn count Test file change, then repeat runs under load #249 recipe: vitest and 8 busy loops on 2 CPUs, 3 runs before and 3 after, load 16 to 31 Durations 2.1 to 2.5 s for both double-start tests; 0 timeouts ~/.pickforge/investigations/436/before-*.log, after-*.log, durations.txt
The old timeout fails under load and the new one holds Heavier load: vitest and 12 busy loops on 1 CPU, 3 runs per phase Both double-start tests Before: run 1 timed out both tests (8.4 s and 10 s). After: 3 of 3 pass at 5.5 to 7 s, past the old 5 s ~/.pickforge/investigations/436/heavy.txt, heavy-*.json
Recheck the agents case under the #249 load recipe and size it if it times out Same #249 runs Single start 0.7 to 0.9 s, no timeout in 9 runs; not sized ~/.pickforge/investigations/436/durations.txt
Full suite full-suite.sh build, lint, typecheck, viewer build, vitest coverage, cargo Pass at 5eab5ae: 3504 vitest tests passed, 4 skipped; cargo 351 passed. 1bed907 only changes the nine-start test timeout; the file passes (8 tests), lint and typecheck pass ~/.pickforge/investigations/436/full/
PickCheck and secret scan pickcheck check --base origin/main --fail-on new,worsened,unmatched; gitleaks on the branch commit 0 violations, 3 files checked; no leaks ~/.pickforge/investigations/436/pickcheck.json

QA pass skipped: this is a test-only change with nothing to drive.

Review

Sol, round 1 at 5eab5ae: 9/10. Its one nit, the nine-start test's fixed 60 s, is fixed in 1bed907.

Two browser profile tests start the built CLI twice but kept vitest's
5 s default, and timed out in a loaded full coverage run. Give them
cliSpawnTimeout(2), as #249 did for the other multi-start CLI tests.
@ElbertePlinio
ElbertePlinio merged commit b1a4709 into main Oct 29, 2026
10 checks passed
@ElbertePlinio
ElbertePlinio deleted the test/436-cli-spawn-timeouts branch October 29, 2026 18: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: browser profile and claude-code agents tests time out at the 5 s default under load

1 participant