Skip to content
This repository was archived by the owner on Nov 2, 2026. It is now read-only.

Default WP Codebox PHPUnit mounts to readonly - #2257

Merged
chubes4 merged 2 commits into
mainfrom
fix/2255-readonly-wordpress-test-mount
Jul 15, 2026
Merged

chubes4 merged 2 commits into
mainfrom
fix/2255-readonly-wordpress-test-mount

Conversation

@chubes4

@chubes4 chubes4 commented Jul 14, 2026 •

Copy link
Copy Markdown
Member

Closes #2255

Summary

  • default implicit WordPress PHPUnit component, dependency, drop-in, and projected file mounts to readonly
  • isolate every WP Codebox PHPUnit invocation in a runner-owned artifact subdirectory and resolve its diagnostic through that invocation's latest-runtime.json pointer
  • preserve caller-owned artifacts, so a stale caller-root NO_TEST_FILES result cannot mask a current runtime startup failure
  • rely on WP Codebox's private PHPUnit cache handling rather than injecting cache path arguments

Source relationship

This runner follows merged Automattic/wp-codebox #1799 readonly mount snapshots, #1804 PHPUnit cache disabling, and #1805 private cache-path handling. The runner creates a new wp-codebox-phpunit.* artifact scope for each recipe-run, resolves the current runtime directory from its pointer, and consumes only that runtime's structured files/phpunit/.pg-test-result.txt. No writable or overlapping component mount is introduced.

Fresh-checkout tests

  1. cd wordpress && node tests/wp-codebox-phpunit-recipe-builder-smoke.js
  2. cd wordpress && bash scripts/test/wp-codebox-mount-translation-smoke.sh
  3. cd wordpress && bash -n scripts/test/test-runner-wp-codebox.sh scripts/test/wp-codebox-mount-translation-smoke.sh scripts/test/playground-db-activation-smoke.sh
  4. Build merged WP Codebox b8c4cfe, then run HOMEBOY_WP_CODEBOX_INSTALL_DIR=/var/empty/wp-codebox HOMEBOY_WP_CODEBOX_BIN=<wp-codebox>/packages/cli/dist/index.js HOMEBOY_WP_CODEBOX_CORE_MODULE=<wp-codebox>/packages/runtime-core/dist/recipe-builders.js HOMEBOY_CORE_DIR=<homeboy> bash wordpress/scripts/test/playground-db-activation-smoke.sh. This PR ran the command against /Users/chubes/Developer/wp-codebox@ops-install-b8c4cfe: 3 tests, 7 assertions.
  5. git diff --check

The fake translation contract verifies readonly source mounts, current-run pointer resolution, a structured bootstrap failure, and that a stale caller-owned NO_TEST_FILES artifact remains preserved but cannot cause a failed current run to skip. The real canary verifies actual WP Codebox diagnostic persistence, successful runner classification, fixture source hash stability, and no host .phpunit.result.cache.

Compatibility impact

Test sandboxes cannot mutate the source checkout by default. PHPUnit diagnostics are consumed from the current WP Codebox runtime artifact. Caller artifact directories retain files unrelated to a new invocation. Mutation workflows must declare an isolated writable source with mode: "readwrite" through wp_codebox_phpunit_mounts.

Dependency

Depends on merged Automattic/wp-codebox #1799, #1804, and #1805.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode/openai-gpt-5.6-sol
  • Used for: Implemented the scoped diagnostic artifact boundary and stale-artifact regression, added real runtime evidence, and verified the merged WP Codebox integration; Chris reviews and owns the change.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Declare WordPress test component mounts readonly

1 participant