test: parallelize the integration pool and stop rebuilding shared artifacts - #25
Conversation
…ifact writers into a serial pool The parallel pool runs mkdtemp-fixture, ephemeral-port files on min(4, cores/2) workers (still 1 on two-core CI, overridable via AGENT_BUNDLE_INTEGRATION_MAX_WORKERS); the six files that rewrite shared package dists stay on one worker in a chained serial config.
overview.e2e, mcp-app-real.e2e, and playground-real.e2e now use the shared memoized buildWorkbench (which honors AGENT_BUNDLE_WORKBENCH_PREBUILT) instead of local copies that rebuilt packages/workbench/dist up to ten times per run; cli.test and the packed-release harness honor a new AGENT_BUNDLE_PACKAGE_PREBUILT flag, with `test:integration` building the whole workspace once up front. With those writes gone, the four files move from the serial pool to the parallel one.
…o the eviction suite The session accepts a test-only maximumRunHistory through its start testing seam; the consolidated eviction test drives a five-run window instead of fifty real invocations and asserts the production default is still fifty.
…rallel workers Concurrent Chrome + dev-server + rsbuild pairs contend for cores, so the parallel config doubles timeScale for its workers and the e2e suites with previously unscaled budgets now honor it (same mechanism CI already uses on two-core runners).
Real in-process example builds can exceed the 5s rstest default when four workers share the machine; explicit per-test timeouts are unaffected.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bfed7558e4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
rstest.integration.config.tsnow computespool.maxWorkersasmax(1, min(4, floor(availableParallelism() / 2)))(still 1 on two-core CI;AGENT_BUNDLE_INTEGRATION_MAX_WORKERSoverrides it), and the redundant--pool.maxWorkers 1CLI flag is gone fromtest:integration:run.pool/isolate, so the split is two chained configs: the parallel pool runs the 52 files that only usemkdtempfixtures, ephemeral ports (port: 0/ rsbuild silent free-port), and read-only prebuilt dists;rstest.integration-serial.config.tsthen runs the two files that rewrite shared state —inspector-shell.e2e(development-mode rebuild ofpackages/workbench/distis under test) andpacked-release.e2e(root build fallback +npm pack+ pre-reserved port). Per-file module isolation (isolate: truedefault) is preserved for the log pipeline suites.overview.e2e(up to 10 builds/run),mcp-app-real.e2e(2), andplayground-real.e2ehad localbuildWorkbenchcopies that ignoredAGENT_BUNDLE_WORKBENCH_PREBUILT; they now use the shared memoized helper.cli.testand the packed-release harness honor a newAGENT_BUNDLE_PACKAGE_PREBUILTflag, withtest:integrationrunning one rootpnpm buildup front. With their shared-dist writes gone, all four moved to the parallel pool.maximumRunHistorythrough its start testing seam; the consolidated eviction test drives a 5-run window instead of 50 real invocations and asserts the production default is still 50.timeScalepolling budgets (the mechanism CI already uses on two-core runners) and the parallel pool raises the 5s default test timeout to 30s; explicit per-test timeouts are unaffected.Measured times (96-core machine, background load avg ~22-25 from other jobs)
AGENT_BUNDLE_INTEGRATION_MAX_WORKERS=1, CI mode)pnpm test:unitThe parallel run is ~3.3x faster than the same-machine serial run (~2.5x vs the quoted baseline; this machine was under heavy background load during measurement, which also inflates the serial number relative to the profiling pass).
Test plan
pnpm typecheckandpnpm lintafter each commitpnpm test:integration:runforced serial (CI shape) — greenpnpm test:integration:runparallel — greenpnpm test:unit— green