Problem
PR #1940 made wordpress.phpunit fail when neither an implicit phpunit.xml.dist nor adjacent phpunit.xml exists. The canonical recipe builder always supplies the default phpunit.xml.dist path but does not materialize that file. Plugins with WP_UnitTestCase files and no repository-owned XML therefore fail before test discovery.
Downstream tracker and reproduction: Extra-Chill/homeboy-extensions#2343
Failing SSI run: https://github.com/Automattic/static-site-importer/actions/runs/29859018600
Regression commit: a9edf319d8ca79013f85ff87b94c85b27e542c67
Expected contract
- Explicit
phpunit-xml paths remain fail-closed when missing or malformed.
- An implicit default profile falls back from
phpunit.xml.dist to adjacent phpunit.xml when present.
- When neither implicit file exists, discovery uses the managed default test root and matchers rather than failing before discovery.
- Missing configured test directories/files and generic zero-test discovery remain failures.
Acceptance criteria
- Add deterministic coverage for a plugin with
WP_UnitTestCase files and no PHPUnit XML.
- Preserve malformed, explicit-missing, and configured-path failure coverage.
- Re-run Static Site Importer PHP 8.1-8.4 successfully through Homeboy.
AI assistance
- AI assistance: Yes
- Tool: OpenAI GPT-5.6 Sol with OpenCode
- Used for: cross-run diagnosis, root-cause isolation, implementation, and verification.
Problem
PR #1940 made
wordpress.phpunitfail when neither an implicitphpunit.xml.distnor adjacentphpunit.xmlexists. The canonical recipe builder always supplies the defaultphpunit.xml.distpath but does not materialize that file. Plugins withWP_UnitTestCasefiles and no repository-owned XML therefore fail before test discovery.Downstream tracker and reproduction: Extra-Chill/homeboy-extensions#2343
Failing SSI run: https://github.com/Automattic/static-site-importer/actions/runs/29859018600
Regression commit:
a9edf319d8ca79013f85ff87b94c85b27e542c67Expected contract
phpunit-xmlpaths remain fail-closed when missing or malformed.phpunit.xml.distto adjacentphpunit.xmlwhen present.Acceptance criteria
WP_UnitTestCasefiles and no PHPUnit XML.AI assistance