Skip to content

Fix browser runner recipe contract#600

Merged
chubes4 merged 2 commits into
mainfrom
fix/browser-runner-contract-580
Jun 4, 2026
Merged

Fix browser runner recipe contract#600
chubes4 merged 2 commits into
mainfrom
fix/browser-runner-contract-580

Conversation

@chubes4
Copy link
Copy Markdown
Collaborator

@chubes4 chubes4 commented Jun 4, 2026

Summary

  • Exposes a reusable browser runner PHP contract on generated browser recipes so partial materializer PHP can inherit the canonical WP Codebox runner prelude instead of depending on JS-side helper stubs.
  • Updates the browser runtime to wrap helper-dependent recipe PHP with the contract-provided prelude and fail clearly when helper-dependent partial PHP has no runner contract.
  • Adds smoke coverage for the generated runner contract and keeps the lifecycle-hook assertion compatible with the current recipe activation hook shape.

Refs #580.

Verification

  • 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 run live-2026-06-04T15-38-38-258Z wrote /var/folders/lr/c_cmmt7s0592m4njz99v5yb40000gn/T/opencode/studio-web-headless-eval-fast/evidence.json

Eval notes

  • The eval no longer shows the /internal/eval.php missing wp_codebox_browser_* helper/global fatal cascade.
  • Browser evidence shows 10 successful /wp-codebox/v1/browser-provider-request responses, so the run reached live provider execution.
  • The remaining failure is later downstream Studio Web materialization metadata: Website materialization import_result missing canonical theme_slug; has_artifact_bundle=false in the eval evidence.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (gpt-5.5)
  • Used for: Drafting the browser runner contract refactor, smoke coverage, validation runs, and PR evidence summary; Chris remains responsible for review and merge.

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