Skip to content

Execute bounded PHP commands in clean Playground processes - #1938

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

Execute bounded PHP commands in clean Playground processes#1938
chubes4 wants to merge 18 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.

AI assistance

OpenCode using openai/gpt-5.6-sol helped merge current main, reconcile runtime-service output fan-out, preserve PHPUnit runtime behavior, and run focused verification. Chris Huber remains responsible for the submitted change.

@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.

@chubes4

chubes4 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

Closing the stale implementation branch while retaining issue #1937. This PR is conflicted and intentionally blocked on still-open WordPress/wordpress-playground#4146; after that API lands, the WP Codebox change should be re-cut minimally from current main using the preserved full-stack evidence here.\n\nAI assistance disclosure: OpenCode using OpenAI gpt-5.6-sol verified the upstream dependency, divergence, CI state, and retained tracker. Chris Huber authorized this cleanup.

@chubes4 chubes4 closed this Aug 3, 2026
@chubes4 chubes4 reopened this Aug 5, 2026
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