Split cli.test.js into focused suites; de-flake Task-pool CLI test - #1153
Merged
Conversation
…ol test cli.test.js had grown to 2000+ lines covering unrelated concerns (core CLI flags, SceneGraph runtime behavior, .bpk encryption, ECP endpoints), making it hard to navigate and slow to scan for a single failure. Split it into cli.test.js (core), cli-scenegraph.test.js, cli-bpk.test.js, and cli-ecp.test.js, with shared exec/zip/ECP helpers factored into cli-test-utils.js to remove duplication between the two ECP suites. Also fixed "Delivers a field set from one Task thread to another Task's thread", which flaked intermittently: task-pool-app's render-thread polling loop only budgeted 5s for the whole multi-hop Task chain (and the dispatch Task's own rendezvous wait was capped at 5s too), which is tight under CI's parallel child-process load and occasionally starved for CPU rather than actually hanging. Widened those budgets and, matching the file's existing timer-hop-app precedent, moved the test to sequential scheduling with a retry so a genuine regression still fails deterministically. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
test/cli/cli.test.js(2000+ lines covering core CLI flags, SceneGraph runtime behavior,.bpkencryption, and ECP endpoints) into four focused files:cli.test.js(core),cli-scenegraph.test.js,cli-bpk.test.js, andcli-ecp.test.js.exec/zipFolder/decryptBpk/ECP-polling helpers (previously duplicated between the two ECP describe blocks) into a newcli-test-utils.js.task-pool-app's render-thread polling loop only budgeted 5s for the whole multi-hop Task chain, and the dispatch Task's own rendezvous wait was capped at 5s too — tight under CI's parallel child-process load, so it occasionally starved for CPU rather than actually hanging. Widened those budgets and moved the test to sequential scheduling with a retry, matching the existingtimer-hop-appprecedent in the same file, so a genuine regression still fails deterministically..claude/CLAUDE.md/.claude/docs/*.md/ probe README references that pointed at specific tests by their oldcli.test.jslocation.Test plan
npx vitest run test/cli— all 7 files pass (94 tests + 1 todo, same count as before the split)npx vitest run(full repo suite) — 203 files, 2540 tests passnpm run lintandnpx prettier --checkon the touched files🤖 Generated with Claude Code