Skip to content

Provide reusable WordPress PHPUnit and bench recipe builders #482

@chubes4

Description

@chubes4

Problem

homeboy-extensions/wordpress manually assembles WP Codebox recipes for WordPress PHPUnit and bench runs in shell. It maps component mounts, dependency mounts, drop-ins, file mounts, WordPress versions, plugin entries, bench workloads, bootstrap files, blueprints, and shared-state mounts into wp-codebox/workspace-recipe/v1.

Some of that is Homeboy policy, but low-level WP Codebox recipe construction and mount normalization belong in WP Codebox. Keeping the recipe shape duplicated in shell makes Homeboy sensitive to WP Codebox contract drift.

Desired shape

Expose reusable recipe builder helpers or CLI commands for common WordPress plugin/theme workflows:

  • PHPUnit recipe for a mounted WordPress plugin/theme component.
  • Bench recipe for configured workloads, optional browser target metadata, dependency plugins, bootstrap files, and blueprint config.
  • Component/dependency/drop-in/file-mount normalization with validation.

Homeboy should pass a component policy/settings payload and receive a validated WP Codebox recipe or run it through a stable WP Codebox command.

Acceptance criteria

  • Add upstream recipe builder(s) or command(s) for WordPress PHPUnit and bench workflows.
  • Builders support plugin/theme component paths, dependency plugin paths, db.php drop-ins, extra file mounts, WordPress version, multisite, wp-config defines, bench env, bootstrap files, workloads, and blueprint fragments.
  • Builders validate path containment and unsafe mounts before returning/running a recipe.
  • Builders return structured diagnostics for invalid settings.
  • Homeboy can remove duplicated recipe construction from wordpress/scripts/test/test-runner-wp-codebox.sh and wordpress/scripts/bench/bench-runner-wp-codebox.sh while retaining Homeboy-specific sidecars and failure classification.
  • Include smoke coverage for PHPUnit recipe generation and bench recipe generation with dependency mounts and a drop-in.

Related

  • Audit source: Homeboy WordPress extension duplication audit.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (openai/gpt-5.5)
  • Used for: Drafted tracker from source audit; Chris remains responsible for prioritization and review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions