Add disposable MySQL runtime service primitive - #1816
Merged
Conversation
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.
Summary
mysqliE2ECloses #1813.
Compatibility
This is additive for recipes that do not declare
inputs.services. Existing recipe and runtime behavior remains unchanged. The schema stays provider-neutral at the recipe boundary; the initialmysqlkind is implemented by Docker, and consumers explicitly choose their own environment variable names. No WPCOM-specific names, paths, or database naming policy are encoded.Evidence
Source relationship: this implements the generic managed-service direction and acceptance criteria in #1813, informed by the linked downstream WPCOM contract and PHP-WASM MySQL readiness constraints.
Change kind: additive runtime-core contract, Docker MySQL provider, CLI orchestration/evidence integration, validation/dry-run surface, deterministic tests, and one registered live integration test.
Verification capability: deterministic tests use injected provider dependencies to prove protocol readiness behavior, loopback ephemeral publication, tmpfs/no persistent volume, credential redaction, Docker context preservation, environment collision validation, timeout/interruption cleanup, already-absent idempotency, and persisted cleanup evidence. The Docker-capable live E2E runs the public recipe lifecycle and PHP-WASM
mysqliquery.Runtime scope: runtime changes are limited to recipes that explicitly declare managed services. The post-review hardening only closes demonstrated ownership gaps during timeout/interruption, preserves the selected Docker daemon context, and treats absence of an
--rmcontainer as successful teardown; it does not alter unrelated runtime functionality.A Docker-capable Lab host already passed the live
mysqliE2E and left zerowp-codeboxcontainers. On the current non-Docker host, the registered package smoke reported its explicit Docker-unavailable skip while all deterministic coverage passed.Fresh-Checkout Testing
git clone https://github.com/Automattic/wp-codebox.gitcd wp-codebox && git checkout feat/1813-disposable-mysql-servicenpm cinpm run buildnpm run test:runtime-servicesnpm run test:runtime-services-lifecyclenpm run smoke -- --group packagenpm run test:disposable-mysql-mysqli-e2e.docker ps -a --filter name=wp-codebox --format "{{.ID}}"; the command must print nothing.AI Assistance
OpenCode with OpenAI GPT-5.6 Sol assisted with review, focused implementation hardening, test coverage, rebase verification, and PR preparation.