feat(runtime): native custom WordPress roots and full browser-action contract - #2482
Draft
chubes4 wants to merge 10 commits into
Draft
feat(runtime): native custom WordPress roots and full browser-action contract#2482chubes4 wants to merge 10 commits into
chubes4 wants to merge 10 commits into
Conversation
Collaborator
Author
Live Docker verification (completed after the PR description was written)The PR body notes local Docker was unavailable. This has now been verified on a Docker-capable runner at
Proven behavior, not shape assertions:
AI assistance: OpenCode with big-pickle implemented the change; Claude Code with claude-sonnet-4-5 ran and verified the live containerized execution and captured this evidence. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2478.
Summary
Closes two gaps in the
wordpress-nativebackend generically (no consumer- or product-specific names):1. Custom WordPress root
runtime.assets.wordpressDirectorywas already resolved by the CLI and honored by Playground, but the native Docker driver ignored it and always ran stock WordPress from its pinned image. The driver now copies the supplied WordPress directory into the contained runtime before install and readiness checks, keeps the pinned image PHP/Apache/OPcache/two-worker behavior, preserves wp-config and database wiring, and records the mounted source (wordPressRoot.source: "directory"+ path) in native provenance so evidence can never be confused with the image default.2. Full browser-action argument contract
wordpress.browser-actionson native now honors:route-host— declared hosts are mapped into the contained runtime (rewritten to the preview origin withhost/x-forwarded-*headers) so host-dependent routing behaves as on Playground.auth-user-id— authenticates as the requested fixture user using only runtime-generated fixture credentials (never caller/ambient credentials); non-fixture user ids fail closed.capture— honorssteps,console,errors,network,screenshot,html; unsupported tokens fail closed with an actionable error.step-timeout— bounds each step as a typedNativeBrowserActionTimeoutError.timeout— bounds the whole action as a typedNativeBrowserActionTimeoutError.Testing
npm cinpm run build— passnpm run test:native-runtime— passgit diff --check— cleanAdded deterministic fake-driver unit coverage in
tests/native-runtime.test.ts(custom-root copy ordering + provenance, and fail-closed browser-argument validation), and extendedtests/native-docker-runtime.integration.test.tsto prove a custom WordPress root and the full argument set under real Docker, skipping explicitly when Docker is unavailable.Honest note: Docker is NOT available on the machine where this was implemented/verified, so the live
native-docker-runtime.integration.test.tslane skipped (reason:trusted-containment-tools-unavailable). It was not run and is not claimed to have passed. The custom WordPress root and full browser-argument behavior require live Docker verification.Non-goals honored
No consumer-specific paths, fixtures, or product names were added to runtime-core or the native package.
AI assistance: OpenCode with big-pickle was used to implement native custom WordPress roots and the full browser-action contract, and to run verification.