Skip to content

Tests (packages): child-process tests are marginal under full-shard parallelism (5-10s budgets; deterministic repro on main) #2653

Closed

Description

@bradhallett

Summary

Several tests in the Tests (packages) CI shard have small fixed budgets (5–10s) and spawn child processes. Under full-shard parallelism they fail on otherwise-idle machines — including a pristine main checkout — while each passes in isolation. PR #2293's CI has hit this 4× in a row on head 9a026a4; none of the failing packages are touched by that diff.

Repro (deterministic on my machine, both on main and on #2293's branch)

pnpm exec turbo run test --continue \
  --filter='!@bb/server' --filter='!@bb/app' --filter='!@bb/integration-tests' \
  --force

Failure set is identical on pristine main and on the PR branch:

Package Failure Budget
bb-plugin-provider-pi src/bridge/catalog.test.ts › "re-reads model scope after the catalog child restarts" — Test timed out 5000ms
@bb/host-workspace "Hook timed out" (2 tests) 10000ms
bb-plugin-tasks 65 tests failed —
@bb/plugin-build 2 tests failed —

(Plus the usual env-dependent entries — desktop, mobile-bridge, contract suites — which need local setup and are not part of this report.)

Each specific test passes when its package's suite runs alone; the whole shard at full turbo parallelism starves the process-spawning tests of CPU.

CI evidence (PR #2293, head 9a026a4)

4 consecutive Tests (packages) failures, three different victims, all timeouts, none in touched packages:

Run Failing test Budget
33185878477 pi catalog.test.ts "re-reads model scope after the catalog child restarts" 5000ms
33186437294 @bb/host-workspace "does not overflow the call stack merging a large subdirectory" (hook) 10000ms
33187231762 pi catalog.test.ts (same test again) 5000ms

Each failure is preceded by a runner-wide warning from the bridge suite:

acp bridge: ACP-native model discovery for "<node>" failed: timed out after 30000ms

That discovery test has a 30s budget and still passes (falls back to the synthetic model) — it's a victim of the same CPU starvation, not a functional failure. Job-level logs for main (job 98903089679) and #2626 (job 98763678652) contain zero such lines; those runs are green.

Suggested directions

  • Raise the marginal budgets for the child-process tests above (5s → 30s for catalog child-restart; hook 10s → 30s), or
  • Serialize/limit the process-heavy projects in CI (turbo --concurrency=…, or move bb-plugin-provider-pi/@bb/host-workspace/bb-plugin-tasks to a dedicated shard), or
  • Convert the fixed timeouts to vi.waitFor-style polling where the assertion is event-based.

Happy to send a PR for whichever direction maintainers prefer — it's independent of #2293.

Activity

  1. added theissue type on Aug 28, 2026
  2. added
    host
    confirmed-repro
    on Aug 28, 2026
  3. bb-slop-cop commented on Aug 28, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

  4. bradhallett commented on Aug 28, 2026

    @bradhallett
    ContributorAuthor

    Independently validated #2655's direction on the machine where the original repro came from:

    Command (full shard, --continue --force) bb-plugin-provider-pi
    uncapped catalog.test.ts "re-reads model scope after the catalog child restarts" — timed out 5000ms
    --concurrency=4 116/116 passed

    One correction to my repro table, for anyone reproducing locally: @bb/host-workspace, bb-plugin-tasks, and @bb/plugin-build failures in that output are local-env artifacts, not load-marginality — host-workspace fails the same two tests even when its suite runs alone, on macOS /var ↔ /private/var symlink path assertions plus an ENOTEMPTY temp-dir cleanup race. The load-marginal set from CI evidence is the pi catalog child-restart test (5s) and the host-workspace merge hook (10s) — both of which pass on CI's green runs and both of which the cap addresses by keeping nested spawn-heavy suites from stacking on the same cores.

    Also 👍 on pinning the flag with packages/scripts/test/ci-workflow.test.ts — makes the limit hard to silently drop.

    For #2293 (whose four red runs prompted the report): once this merges, a fresh CI run from the updated merge ref should go green. Happy to retrigger from the fork side once it lands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reprohostperf

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions