mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
* perf(cli): run E2E tests in parallel via worker pool The custom CLI test runner ran 35 tsx test files sequentially, making the cli-tests CI job the longest in main CI (~17 minutes). Each test file already isolates its own daemon (ephemeral port + tmp PASEO_HOME), so parallelism was just gated by the runner. Replace the sequential recursion with a fixed-size worker pool (default concurrency=4 to match GitHub Actions standard runners; override via PASEO_CLI_TEST_CONCURRENCY). Buffer per-test stdout/stderr and flush as a contiguous block on completion so concurrent output stays readable, and report per-test wall clock plus the five slowest tests. Local wall clock drops from ~12-15 minutes serial to ~2:49 with concurrency=4. The slowest single test (05-agent-run, 49s) is now the floor; CI should land near 4-5 minutes. * fix(cli-tests): deflake 30-chat under load and shard CI across 3 runners `chat wait` reads the latest message id and then subscribes for newer messages. Under CI load the subprocess takes >1s to bootstrap, so the old test's 250ms head start before posting "second message" raced against that read. When the post landed first, the subprocess saw the second message as latest and timed out waiting for a newer one. Replace the brittle delay with a post-and-race loop: every iteration posts a fresh "second message" and races a 250ms tick against the wait promise, so whichever message lands after the snapshot wakes wait deterministically. CI was also slower than local (10.3min vs 2.8min). On 4-vCPU GHA runners, 35 sequential-CPU-time of ~1850s caps wall clock around 8 min even at concurrency=4. Shard the suite across 3 GHA runners via matrix strategy. The runner now reads PASEO_CLI_TEST_SHARD/SHARD_TOTAL and distributes files into buckets — known long-pole tests (05/06/11/13/14-...) round-robin first so they spread across shards instead of clustering by their numeric prefixes, then the remainder fills in the reverse direction to balance light load. Local run is unchanged (single shard by default). Expected per-shard wall on CI: ~2:30 + setup ≈ ~4:30 total.