Conversation
The managed-vps codebox account could only touch `codebox\_%` databases, but wp-codebox's external provider creates `wp_codebox_<hex>` databases, creates and grants a per-run user, and first checks mysql.user for a name collision. Its first query was denied, so every managed PHPUnit run failed in provision_runtime_services and Homeboy reported zero executed tests (Extra-Chill/homeboy#15333). Grant ALL on `wp\_codebox\_%` WITH GRANT OPTION (scoped to the pattern), CREATE USER, and SELECT (User, Host) on mysql.user (no password hashes). Still nothing on the site database.
Member
Author
|
Closing: wrong direction. Components should run PHPUnit on wp-codebox's built-in |
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.
Fixes the root cause of Extra-Chill/homeboy#15333.
Problem
homeboy review test <wordpress component>on the managed VPS reportsPHPUNIT_ZERO_TESTS cause=recipe_run_no_executions, including on cleanmain. The real failure is one phase earlier, in the wp-codebox recipe evidence:wp-codebox's external MySQL provider (
packages/cli/src/runtime-services.ts,provisionMysqlExternalService) uses the configured account as a host-side provisioner:SELECT … information_schema.SCHEMATA …; SELECT … FROM mysql.user WHERE User=… AND Host='%'(namespace-unused preflight)CREATE DATABASE wp_codebox_<hex>CREATE USER wpcb_<hex>@'%'+GRANT ALL ON wp_codebox_<hex>.*to itThe account this module provisions (
wp_coding_agents_codebox@127.0.0.1) had onlyALL ON \codebox_%`.*: the wrong prefix, noCREATE USER, no grant option, and nomysql.userread. Step 1 is denied, so nothing ever runs. Verified live:SHOW GRANTSshows exactly that, andmysqladmin ping` with the account succeeds, so connectivity is fine.Why not loosen wp-codebox instead: it deliberately never projects the provisioning credential into the sandbox (tested invariant
runtime-service-admin-env-exposed, and a failedCREATE USERis fatal by test). Falling back to the provisioner account inside the sandbox would break that.Change
wp_codebox_%databases. Nothing touches the site database.mysql.useris column-scoped toUser, Host, so password hashes stay unreadable.CREATE USERis global by MySQL design. Tradeoff: it also permitsDROP USER/RENAME USERon any account, which is a denial-of-service risk but gives no data access. The same environment already holds the site'swp-config.phpcredentials with ALL on production data, so the marginal exposure is small. This needs an explicit reviewer call.ALL … ON *.*, no unscopedmysql.userread.Verification
bash tests/codebox-database.sh→ 21/21 assertions passed.bash -nis clean../upgrade.sh --systems-capabilities managed-vpsas root. Afterwards,homeboy review test data-machine-events --placement localshould execute tests. The oldcodebox\_%grant is left in place and is harmless.Provenance
Written directly by Extra Chill Bot (OpenCode in Discord, operator-requested). Cook is still blocked by homeboy#15331 until #15339 ships.
🤖 AI-assisted: authored by Extra Chill Bot, pending human review.