Problem
startPlaygroundCliServer() hard-codes workers: 6. Each Playground worker applies the full mounted file tree, so large generated runtimes scale startup work by six with no caller control.
In the WPCOM TeamCity parity workload, the mounted runtime contains 257,074 entries. The fixed PHP 8.4 ABI runtime plus this mount:
- boots successfully with
workers: 1 in a direct runCLI() probe;
- times out after 1,500 seconds in WP Codebox with hard-coded
workers: 6;
- emits no
preview:connecting-client event before timeout.
Evidence: code-deployments-shell-v65, run run_42c... in the retained Homeboy Lab parity workspace. The timeout is classified as input.materialize; runtime startup itself completes before runCLI() begins mounting.
Proposed contract
Add a backend-neutral runtime worker-count option to the workspace recipe/runtime contract, validate it as a positive bounded integer or auto, propagate it through PHPUnit recipe building and dry-run plans, and pass it to Playground CLI. Preserve the current default for callers that do not specify it.
WPCOM parity can then request one Playground request worker while bounded PHPUnit process concurrency remains controlled independently by the bounded runtime plan.
Acceptance
- Existing callers retain the current default worker count.
- A recipe can request one Playground worker.
- CLI startup receives the requested count.
- Schema, semantic validation, dry-run, and runtime tests cover the option.
- The WPCOM CodeDeployments parity slice reaches PHPUnit with
workers: 1.
AI assistance
OpenCode using openai/gpt-5.6-sol helped diagnose the mount-scaling failure and draft this issue. Chris Huber remains responsible for the report.
Problem
startPlaygroundCliServer()hard-codesworkers: 6. Each Playground worker applies the full mounted file tree, so large generated runtimes scale startup work by six with no caller control.In the WPCOM TeamCity parity workload, the mounted runtime contains 257,074 entries. The fixed PHP 8.4 ABI runtime plus this mount:
workers: 1in a directrunCLI()probe;workers: 6;preview:connecting-clientevent before timeout.Evidence:
code-deployments-shell-v65, runrun_42c...in the retained Homeboy Lab parity workspace. The timeout is classified asinput.materialize; runtime startup itself completes beforerunCLI()begins mounting.Proposed contract
Add a backend-neutral runtime worker-count option to the workspace recipe/runtime contract, validate it as a positive bounded integer or
auto, propagate it through PHPUnit recipe building and dry-run plans, and pass it to Playground CLI. Preserve the current default for callers that do not specify it.WPCOM parity can then request one Playground request worker while bounded PHPUnit process concurrency remains controlled independently by the bounded runtime plan.
Acceptance
workers: 1.AI assistance
OpenCode using
openai/gpt-5.6-solhelped diagnose the mount-scaling failure and draft this issue. Chris Huber remains responsible for the report.