Problem
wordpress.bench does not currently guarantee that declared plugin dependencies are loaded in the PHP request that executes benchmark workloads.
This surfaced while building Homeboy evidence for WooCommerce Stripe Express Checkout performance issue woocommerce/woocommerce-gateway-stripe#1439.
Homeboy generated a WP Codebox recipe with:
- WooCommerce mounted at
/wordpress/wp-content/plugins/woocommerce
- Stripe mounted at
/wordpress/wp-content/plugins/woocommerce-gateway-stripe
- blueprint
activatePlugin steps for both plugins
wordpress.bench args including dependency-slugs=woocommerce
The workload still failed with:
Fatal error: Uncaught RuntimeException: WooCommerce is not active in the benchmark runtime.
The workload check was:
if ( ! function_exists( 'WC' ) || ! class_exists( 'WooCommerce' ) ) {
throw new RuntimeException( 'WooCommerce is not active in the benchmark runtime.' );
}
Root Cause Direction
The current bench handler activates plugins after wp-load.php and manually fires synthetic lifecycle hooks. If the blueprint already activated the plugin, is_plugin_active() causes bench to skip activate_plugin(), so the plugin main file may never be included in the current request.
A local patch that explicitly require_onces the component/dependency plugin files made the built-in WP Codebox bench smoke tests pass, but the real WooCommerce/Stripe rig still needs deeper hardening/diagnostics to prove the full integration contract.
Desired Contract
For wordpress.bench:
dependency-slugs means those plugin main files are available to benchmark workloads in the current PHP request.
- The component plugin main file is also available before benchmark workloads run.
- Bench should either load dependencies successfully or fail with a structured diagnostic that names the missing plugin file, active state, include status, and relevant paths.
- Blueprint activation and bench dependency loading should not fight each other.
- Homeboy can pass mounted plugins +
dependency-slugs and expect plugin functions/classes to be visible in workloads.
Repro Context
Worktree used locally:
/Users/chubes/Developer/wp-codebox@fix-bench-load-active-plugins
Temporary Homeboy rig package:
/var/folders/lr/c_cmmt7s0592m4njz99v5yb40000gn/T/opencode/wc-stripe-ece-perf-rig
Bench command used:
HOMEBOY_WP_CODEBOX_BIN="/Users/chubes/Developer/wp-codebox@fix-bench-load-active-plugins/packages/cli/dist/index.js" \
homeboy bench --force-hot --rig wc-stripe-ece-product-page --profile smoke --iterations 1 --warmup 0 \
--shared-state "/var/folders/lr/c_cmmt7s0592m4njz99v5yb40000gn/T/opencode/wc-stripe-ece-perf-rig/artifacts" \
--output "/var/folders/lr/c_cmmt7s0592m4njz99v5yb40000gn/T/opencode/wc-stripe-ece-perf-rig/bench-output.json"
Recent artifact path from a failed run:
/var/folders/lr/c_cmmt7s0592m4njz99v5yb40000gn/T/homeboy-wp-codebox-bench-artifacts.T9d6Yz/runtime-mpzh2d4q-ussybx
Acceptance Criteria
- Add coverage proving
wordpress.bench workloads can see dependency plugin functions/classes loaded from dependency-slugs.
- Add diagnostics for missing dependency/component plugin files or load failures.
- Verify existing smoke tests still pass.
- Verify the WooCommerce/Stripe Homeboy rig no longer fails at the dependency-loading stage.
Problem
wordpress.benchdoes not currently guarantee that declared plugin dependencies are loaded in the PHP request that executes benchmark workloads.This surfaced while building Homeboy evidence for WooCommerce Stripe Express Checkout performance issue woocommerce/woocommerce-gateway-stripe#1439.
Homeboy generated a WP Codebox recipe with:
/wordpress/wp-content/plugins/woocommerce/wordpress/wp-content/plugins/woocommerce-gateway-stripeactivatePluginsteps for both pluginswordpress.benchargs includingdependency-slugs=woocommerceThe workload still failed with:
The workload check was:
Root Cause Direction
The current bench handler activates plugins after
wp-load.phpand manually fires synthetic lifecycle hooks. If the blueprint already activated the plugin,is_plugin_active()causes bench to skipactivate_plugin(), so the plugin main file may never be included in the current request.A local patch that explicitly
require_onces the component/dependency plugin files made the built-in WP Codebox bench smoke tests pass, but the real WooCommerce/Stripe rig still needs deeper hardening/diagnostics to prove the full integration contract.Desired Contract
For
wordpress.bench:dependency-slugsmeans those plugin main files are available to benchmark workloads in the current PHP request.dependency-slugsand expect plugin functions/classes to be visible in workloads.Repro Context
Worktree used locally:
Temporary Homeboy rig package:
Bench command used:
Recent artifact path from a failed run:
Acceptance Criteria
wordpress.benchworkloads can see dependency plugin functions/classes loaded fromdependency-slugs.