Skip to content

Handle cross-realm PHP-WASM worker failures - #2016

Merged
chubes4 merged 1 commit into
mainfrom
fix/2010-worker-rejection-exit
Jul 24, 2026
Merged

Handle cross-realm PHP-WASM worker failures#2016
chubes4 merged 1 commit into
mainfrom
fix/2010-worker-rejection-exit

Conversation

@chubes4

@chubes4 chubes4 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • detect fatal PHP-WASM runtime rejections across JavaScript realm boundaries
  • retain the narrow RuntimeError name plus php.wasm stack signature
  • make the real worker-thread regression construct its runtime error in a separate VM realm

Root cause

The Data Machine rerun loaded WP Codebox merge c7127392 but reproduced the same 25-minute timeout. The production PHP-WASM error crosses a JavaScript realm boundary, so error instanceof WebAssembly.RuntimeError is false even though its name is RuntimeError and its stack originates from php.wasm. The original regression constructed the error in the worker realm and therefore missed this compatibility surface.

This follow-up preserves ordinary Playground rejection handling while recognizing the reproduced cross-realm fatal error. Evidence: Extra-Chill/data-machine Actions run 30094573746, attempt 4, job 89554191976.

Follow-up to #2012. Related: #2010 and WordPress/wordpress-playground#4160.

Verification

  • npm ci
  • npm run build
  • npm run test:playground-worker-runtime-rejection
  • npm run test:phpunit-runtime-rejection
  • npm run test:playground-phpunit-readonly-cache-integration
  • npm run test:php-wasm-extension-manifests

AI assistance

OpenAI GPT-5.6 Sol via OpenCode analyzed the failed CI evidence, identified the cross-realm mismatch, drafted the predicate and regression update, and ran the listed verification. Chris Huber reviewed and remains responsible for the change.

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.

1 participant