Skip to content

Fall back from cloned browser runner requests#583

Merged
chubes4 merged 1 commit into
mainfrom
fix/browser-runner-clone-safe-execution
Jun 4, 2026
Merged

Fall back from cloned browser runner requests#583
chubes4 merged 1 commit into
mainfrom
fix/browser-runner-clone-safe-execution

Conversation

@chubes4
Copy link
Copy Markdown
Collaborator

@chubes4 chubes4 commented Jun 4, 2026

Summary

  • Detect Playground worker structured-clone failures in both direct and wrapped browser request diagnostics.
  • Keep the HTTP PHP runner request path as the default for forced runner execution, but fall back to direct client.run() when the request transport rejects the call because an installed browser provider proxy callback cannot be cloned across the worker boundary.
  • Add browser runtime smoke coverage that simulates client.onMessage() installing a provider proxy callback, reproduces the cloned-function request failure, and verifies generated recipe execution falls back safely.

Follow-up to #582 for #580.

Testing

  • node --check packages/wordpress-plugin/assets/browser-runtime.js
  • npm run browser-runtime-operation-smoke
  • php tests/smoke-wordpress-plugin.php
  • Studio Web live eval against this WP Codebox branch with --plugin-source wp-codebox=/Users/chubes/Developer/wp-codebox@eval-main-20260604-580/packages/wordpress-plugin wrote /var/folders/lr/c_cmmt7s0592m4njz99v5yb40000gn/T/opencode/wp-codebox-580-clone-safe-eval/evidence.json. It did not show playground_request_failed or could not be cloned; the run failed earlier at codebox_session_ready because Studio Web reported the prepared preview target was not browser-ready.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (openai/gpt-5.5)
  • Used for: Diagnosed the follow-up browser Playground transport failure, implemented the clone-safe fallback and smoke coverage, ran verification, and drafted this PR description for Chris to review.

@chubes4 chubes4 merged commit 94004d2 into main Jun 4, 2026
@chubes4 chubes4 deleted the fix/browser-runner-clone-safe-execution branch June 4, 2026 20:59
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