Skip to content

fix: preinstall native multisite PHPUnit state - #2494

Draft
chubes4 wants to merge 5 commits into
mainfrom
fix/native-phpunit-multisite-bootstrap
Draft

fix: preinstall native multisite PHPUnit state#2494
chubes4 wants to merge 5 commits into
mainfrom
fix/native-phpunit-multisite-bootstrap

Conversation

@chubes4

@chubes4 chubes4 commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

Managed wordpress.phpunit multisite preinstall now supports MySQL and mdi-native canonical state.

References Automattic/markdown-database-integration#377.

Root Cause

Native preinstall created canonical state, but the follow-up boot omitted the wp-phpunit installation context. The MDI drop-in then terminated with Error establishing a database connection. The follow-up boot now defines WP_INSTALLING and DISABLE_WP_CRON and loads wp-phpunit functions. Persisted PREINSTALL progress markers bound future installer failures.

Final Exact-Head Verification

  • Fresh detached Git checkout HEAD: a735ed3.
  • Fresh npm ci and npm run build:release passed.
  • Build provenance: 0.26.8 / a735ed3 / a5f1700bcea72eab619dcb183ba42370caa00b0a770bb1a2a55fc7546d76c6af.
  • npx tsx tests/phpunit-project-autoload.test.ts passed.
  • Native bundled-MDI integration passed from the fresh CLI: single site total 3, passed 2, failed 0, skipped 1; multisite total 3, passed 3, failed 0, skipped 0. The native runtime uses custom-drop-in with no external service.
  • Bundled MDI revision: 11652defdfa88576ee91699b3545ecf0d486f055; archive SHA-256: 335bb694f7e6b4185f6d514e61c14ec220ab163fa9d959159d6c26411680cf6c.
  • MDI PR395 source was independently pinned at 04c85bf78c1d1c41043cb18e9fd0a62d421b2bac. This retained checkout has tests/probe-native-multisite-wordpress.php but not VenueProfileMutationsTest.php, so no fabricated DME venue result is claimed.
  • MySQL E2E command npx tsx tests/disposable-mysql-mysqli.integration.test.ts skipped because Docker is unavailable in this Lab. The focused semantics test covers managed SQLite/MySQL/native backend selection and multisite preinstall branching; a runtime MySQL comparison requires a Docker-capable Lab.

CI Status

At final inspection: workflow-lint, fast contracts, and package check passed; browser and integration were pending.

AI assistance

OpenAI GPT-6 Astra (openai/gpt-6-astra) via OpenCode implemented the original backend-neutral preinstall gate. OpenAI GPT-5.6 Terra (openai/gpt-5.6-terra) via OpenCode reproduced and diagnosed the native Playground failure, implemented the boot-context repair, and ran fresh exact-head verification.

DME Pair Evidence (homeboy-lab)

  • Remote Docker verified: /usr/bin/docker, daemon 29.1.3.
  • Codebox source/build: a735ed3; MDI source: 04c85bf78c1d1c41043cb18e9fd0a62d421b2bac. Consumer root: /home/chubes/labs/mdi-a735ed3d-04c85bf-consumer.
  • Native full VenueProfileMutationsTest run artifact: artifacts/venue-native-a735ed3d-04c85bf. PHPUnit ran 24 tests and exited 2: three direct mysqli root@localhost errors, one failure, two skips. This is not a passing suite.
  • Native foreign attachment identity artifact: artifacts/venue-foreign-native-a735ed3d-04c85bf. One test, three assertions, one failure: test_foreign_site_attachment_is_rejected returned an array instead of the expected WP_Error.
  • Disposable MySQL identity artifact: artifacts/venue-foreign-mysql-a735ed3d-04c85bf. The identical filtered selector passed.
  • This is a native-only DME contract regression exposed by the bootstrap change; full disposable-MySQL Venue comparison remains required before landing.

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