Skip to content

Execute bounded PHP commands in clean Playground processes#1938

Open
chubes4 wants to merge 5 commits into
mainfrom
fix/pre-wordpress-request-dispatch
Open

Execute bounded PHP commands in clean Playground processes#1938
chubes4 wants to merge 5 commits into
mainfrom
fix/pre-wordpress-request-dispatch

Conversation

@chubes4

@chubes4 chubes4 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Fixes #1937.

Depends on WordPress/wordpress-playground#4146.

What changed

  • Routes bounded code executions with processIdentity through Playground's runInFreshProcess().
  • Removes the HTTP request-worker endpoint and payload-file transport.
  • Preserves runtime and secret environment injection for bootstrap=none.
  • Lets project bootstrap mode own WordPress loading instead of prepending managed /wordpress/wp-load.php.
  • Permits project-mode PHPUnit configurations that do not declare a bootstrap.
  • Fails clearly when a selected Playground backend does not expose clean-process execution.
  • Decodes the bootstrap diagnostic wrapper in project-autoload assertions added on current main.

Verification

  • npm run build
  • npx tsx tests/playground-cli-runner-bootstrap-ini.test.ts
  • npx tsx tests/phpunit-project-autoload.test.ts
  • Combined downstream acceptance using the Playground #4146 package: 680/680 TeamCity-equivalent PHPUnit suites passed at concurrency 64, with zero failures, timeouts, or cancellations.

Merge dependency

The code intentionally fails closed for bounded process identities until the selected Playground backend provides runInFreshProcess(). Merge/release coordination should therefore follow WordPress/wordpress-playground#4146.

@chubes4
chubes4 force-pushed the fix/pre-wordpress-request-dispatch branch from 7cd5178 to 72e2acd Compare July 21, 2026 22:15
@chubes4

chubes4 commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator Author

Full-stack proof update for the clean-process PHPUnit path:

Using that combined Playground build plus this PR on Homeboy Lab, real focused WPCOM PHPUnit execution passed under the new non-zero test-summary gate:

  • MediaCreateAbilityIntegrationTest: 12 tests, 50 assertions
  • JetpackClientActionUploadAudioTest: 6 tests, 13 assertions
  • JetpackClientActionUploadImageTest: 7 tests

The unfiltered wpcom-mcp-abilities suite also executed all 443 tests; it reported 11 unrelated locale-environment errors rather than a false process-level success. This PR now rejects zero-exit PHPUnit runs that do not contain a non-zero OK (...) summary.

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.

Execute bounded PHP commands through clean Playground processes

1 participant