Skip to content

Forward base_ref to WP Codebox publication config #156

Description

@chubes4

Problem

Docs Agent accepts base_ref and uses it for recipe metadata and workspace materialization, but omits the corresponding base field from the runner_workspace JSON passed to WP Codebox. WP Codebox therefore applies its generic main fallback during publication.

This breaks consumers whose base branch is not main. Build with WordPress uses trunk; after all integrity and verification gates pass, publication fails with:

GitHub API GET /git/ref/heads/main failed with 404.

Acceptance evidence: https://github.com/Automattic/build-with-wordpress/actions/runs/29645661510

Root cause

.github/workflows/maintain-docs.yml builds runner workspace JSON with from: ("origin/" + $baseRef) but no base: $baseRef. WP Codebox publication reads config.base || config.base_branch || "main", so clone/materialization and publication disagree.

Acceptance criteria

  1. Include base: $baseRef in the emitted runner workspace config.
  2. Add deterministic contract coverage proving a non-main base_ref reaches both base and from.
  3. Keep the generic WP Codebox fallback unchanged.
  4. Build with WordPress manual PR-required maintenance publishes against trunk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions