Skip to content

Harden PHPUnit suite and mount contracts - #2159

Merged
chubes4 merged 1 commit into
mainfrom
stabilize/phpunit-mount-contracts
Jul 29, 2026
Merged

Harden PHPUnit suite and mount contracts#2159
chubes4 merged 1 commit into
mainfrom
stabilize/phpunit-mount-contracts

Conversation

@chubes4

@chubes4 chubes4 commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • parse PHPUnit runner options and --testsuite selectors in one generated-PHP pass
  • make explicit suite selection authoritative over the default discovery root
  • prove file-only suites discover exactly their configured files
  • extend the real Playground integration to cover readonly parent plus readonly nested overlay visibility and host isolation

Fixes #2158. Follow-up hardening for #2153 and #2154.

Verification

  • npm run build
  • npm exec -- tsx tests/phpunit-project-autoload.test.ts
  • npm run test:phpunit-structured-evidence
  • npm run test:phpunit-runtime-rejection
  • npm exec -- tsx tests/playground-direct-mount-materialization.test.ts
  • npm exec -- tsx tests/staged-input-materialization.test.ts
  • npm exec -- tsx tests/mount-materialization.test.ts
  • npm exec -- tsx tests/recipe-runtime-setup-staged-materialization.test.ts
  • npm exec -- tsx tests/playground-readonly-mounts.test.ts
  • npm exec -- tsx tests/playground-readonly-mounts-integration.test.ts

Full WPCOM TeamCity parity at comparator SHA 7ae9ae21ca30f7fc9724aecfb54a16f674f82a23:

  • 677/677 suites passed
  • 674/674 WP Codebox suites passed
  • 3/3 native suites passed
  • zero failures and zero timeouts
  • 4 shards x 6 workers, timeout multiplier 3

Reproduction: run node scripts/run-wpcom-teamcity-parity.mjs --mode execute --allow-execute true --manifest artifacts/phpunit-profiles/teamcity-parity-manifest-7ae9ae21-corrected.json --concurrency 6 --shards 4 --timeout-multiplier 3 from the WPCOM Codebox parity workspace with the certified runtime inputs.

AI Assistance

OpenAI gpt-5.6-sol via OpenCode identified the file-only suite edge case, consolidated generated-PHP option parsing, expanded executable integration coverage, and ran local and full WPCOM verification. Chris Huber remains responsible for the change.

@chubes4
chubes4 merged commit ec3ebfc into main Jul 29, 2026
2 of 4 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.

Selected file-only PHPUnit suites retain default discovery root

1 participant