Skip to content

fix(phpunit): boot the WP test library in isolated children and keep the run alive on child failure - #2627

Merged
chubes4 merged 1 commit into
mainfrom
fix/issue-2626-wp-codebox
Dec 3, 2026
Merged

chubes4 merged 1 commit into
mainfrom
fix/issue-2626-wp-codebox

Conversation

@chubes4

@chubes4 chubes4 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes #2626. On main, the PHPUnit 12 fixture stalled when an isolated child opened the shared WordPress database. With this change, both isolated data sets pass against the already-installed site, and fatal or empty children are reported as test errors without stopping the suite.

What changed

  • Include the child’s exit code and bounded stdout and stderr in isolation errors, preserving fatal text even when PHPUnit redirects its error log.
  • Use PHPUnit’s native error event path without emitting a finish event for an unprepared test, so TestDox and other collectors report the error and later tests.
  • Apply the parent’s skip-install settings in the child and forward file-lock requests for the shared SQLite database.
  • Cover the full WordPress bootstrap with a PHPUnit 12 data provider, and verify fatal and empty child handling on PHPUnit 10–12.

Verification

All gates passed on 90bf20e. Base main@aa8f67b advanced to 37680a2 (base_behind_by: 1; rebase onto the current base before merging).

  • HOMEBOY_LINT_BASE=aa8f67b8e226f158a6594b9dcd460cc1cc9995f1 homeboy --placement local review lint wp-codebox --path . --…: passed, 99051 ms; retained gate metadata.
  • npm run build: passed, 942 ms; retained gate metadata.
  • npx tsx --test tests/phpunit-discovery-only.test.ts tests/phpunit-project-autoload.test.ts: passed, 1445 ms; retained gate metadata.
  • repro: none (no repro gate was declared, so these gates do not prove the issue).
  • CI: pending

Cook run
  • Cook ID: agent-task-31068eff-4da3-41cf-b713-b2933c2a2469
  • Attempt run ID: agent-task-31068eff-4da3-41cf-b713-b2933c2a2469-attempt-1-55a96fb3
  • Gate 1: tree 8a2c760793400730ada112775d722f61428eba94
  • Gate 2: tree 8a2c760793400730ada112775d722f61428eba94
  • Gate 3: tree 8a2c760793400730ada112775d722f61428eba94

Evidence

  • The build and focused discovery and project-autoload tests passed locally. Controller verification remains with Homeboy.
  • The full-bootstrap fixture timed out on main. On the candidate, the isolation integration suite passed on PHPUnit 9–12 with no skips, including the fatal and empty child cases.

AI disclosure

Tool: Homeboy Cook. Agent: Homeboy (roadie). Model: roadie · route cook-heavy · served gpt-6.2-sol. Cook time: 1h10m.

The AI traced the bootstrap and event failures, implemented the fixes, and verified them with real PHPUnit runs in Playground, under the direction of the Cook requester. Homeboy reports controller verification separately from this account of the AI's work. A human reviews before merge.

Refs #2626

@chubes4
chubes4 marked this pull request as ready for review December 3, 2026 05:09
@chubes4
chubes4 merged commit cae866c into main Dec 3, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PHPUnit isolated child that loads the full WP test bootstrap dies silently, then the PHPUnit 12 TestDox collector aborts the run

1 participant