You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
wordpress.phpunit discovery returns relative file paths when phpunit-xml is relative #2601
When wordpress.phpunit discovery-only=true gets a relative phpunit-xml (here, phpunit-managed.xml.dist from a component's wp_codebox_phpunit_suites), the wp-codebox/phpunit-discovery/v1 result echoes phpunit_xml back as given and returns relative file paths. Meanwhile test_root is absolute:
With the default config (phpunitXml defaults to /wordpress/wp-content/plugins/<slug>/phpunit.xml.dist, in wordpress-command-runners.ts:979), the same call returns absolute /wordpress/... paths. The output shape therefore depends on how the caller spelled the config path.
Impact
Homeboy's WordPress adapter (readDiscoveryResult in wp-codebox-phpunit-adapter.mjs) requires every file to start with /. For any component with a relative managed-suite config, it rejects the result with "WP Codebox returned an invalid PHPUnit discovery result." As a result, every homeboy review test for extrachill-events reports test_runtime_evidence.reason: internal runtime inventory producer failed (exit 1), and the runtime inventory is never produced. Execution itself is unaffected, because cwd is the plugin root, so this has gone unnoticed. Reproduced on homeboy-lab with WP Codebox v0.34.2 and the wordpress extension 3.56.7.
Target state
Resolve a relative phpunitXml against the plugin root once, when the runner options are built, so discovery, execution and posix.dirname(options.phpunitXml) all see one canonical absolute path.
Discovery files and phpunit_xml must be absolute sandbox paths, whatever the caller's spelling.
Add a regression test: discovery with phpunit-xml=phpunit-managed.xml.dist (relative) returns the same absolute file list as the absolute spelling.
Activity
chubes4 commentedon Nov 27, 2026
Fixed by #2602.