Symptom
Every @runInSeparateProcess / @runTestsInSeparateProcesses test in Extra-Chill/extrachill-users fails in CI (managed sandbox, wp_codebox_phpunit_bootstrap_mode: managed) with:
Test was run in child process and ended unexpectedly
Reproduced with a minimal probe — a noop isolated test dies identically:
class Test_Isolation_Probe extends WP_UnitTestCase {
/** @runInSeparateProcess @preserveGlobalState disabled */
public function test_noop_in_separate_process(): void { $this->assertTrue( true ); }
}
Evidence: Extra-Chill/extrachill-users#391 (19 tests across 5 classes), probe at branch fix-391-test-baseline (commit 5d389b5), GitHub run 34170973133.
Diagnosis
Per PHPUnit 9's AbstractPhpProcess::processChildResult() (vendor/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php:276-309), this failure means BOTH:
- child stderr was empty — no PHP fatal occurred (the child template sets
display_errors=stderr before autoload, so any fatal would surface), and
- the child result file was never written — the child exited or was killed before
file_put_contents(processResultFile) at the end of __phpunit_run_isolated_test().
The child runs php with the template job on STDIN (DefaultPhpProcess::runProcess → proc_open), bare ini, then requires the composer autoload plus $GLOBALS['__PHPUNIT_BOOTSTRAP'] (the managed bootstrap) before running the test. A silent death with no output points at an exit() in the child bootstrap path or a process kill — not a PHP error.
What it breaks
- 19 tests in extrachill-users cannot run in CI at all.
- Any future test using process isolation in any repo on this harness hits the same wall.
Ask
Investigate the child-process path in the sandbox: whether proc_open/STDIN execution of the PHPUnit template is permitted, whether the managed bootstrap exits early when re-run in a child context, and whether the result temp file (parent sys_get_temp_dir()) is writable from the child's mount namespace.
Repro: push a noop @runInSeparateProcess test on any repo configured with wp_codebox_phpunit_bootstrap_mode: managed.
Filed from Extra-Chill/extrachill-users#391 / PR Extra-Chill/extrachill-users#393.
Symptom
Every
@runInSeparateProcess/@runTestsInSeparateProcessestest in Extra-Chill/extrachill-users fails in CI (managed sandbox,wp_codebox_phpunit_bootstrap_mode: managed) with:Reproduced with a minimal probe — a noop isolated test dies identically:
Evidence: Extra-Chill/extrachill-users#391 (19 tests across 5 classes), probe at branch
fix-391-test-baseline(commit 5d389b5), GitHub run 34170973133.Diagnosis
Per PHPUnit 9's
AbstractPhpProcess::processChildResult()(vendor/phpunit/phpunit/src/Util/PHP/AbstractPhpProcess.php:276-309), this failure means BOTH:display_errors=stderrbefore autoload, so any fatal would surface), andfile_put_contents(processResultFile)at the end of__phpunit_run_isolated_test().The child runs
phpwith the template job on STDIN (DefaultPhpProcess::runProcess→proc_open), bare ini, then requires the composer autoload plus$GLOBALS['__PHPUNIT_BOOTSTRAP'](the managed bootstrap) before running the test. A silent death with no output points at anexit()in the child bootstrap path or a process kill — not a PHP error.What it breaks
Ask
Investigate the child-process path in the sandbox: whether
proc_open/STDIN execution of the PHPUnit template is permitted, whether the managed bootstrap exits early when re-run in a child context, and whether the result temp file (parentsys_get_temp_dir()) is writable from the child's mount namespace.Repro: push a noop
@runInSeparateProcesstest on any repo configured withwp_codebox_phpunit_bootstrap_mode: managed.Filed from Extra-Chill/extrachill-users#391 / PR Extra-Chill/extrachill-users#393.