Skip to content

Forward publication base ref (#156)#158

Open
chubes4 wants to merge 1 commit into
mainfrom
fix-156-forward-publication-base-v2-rerun
Open

Forward publication base ref (#156)#158
chubes4 wants to merge 1 commit into
mainfrom
fix-156-forward-publication-base-v2-rerun

Conversation

@chubes4

@chubes4 chubes4 commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Forward the reusable workflow base_ref into runner-workspace publication as base, while preserving materialization as from: "origin/" + base_ref.

Evidence

  • Issue: Forward base_ref to WP Codebox publication config #156
  • Source relationship: the reusable maintain-docs.yml workflow already passed INPUT_BASE_REF to its jq runner-workspace builder and used it for from; publication was the missing consumer.
  • Change kind: minimal workflow-contract correction plus deterministic contract coverage.
  • Verification capability: the contract evaluates the emitted jq expression with baseRef=trunk, requiring base=trunk and from=origin/trunk.
  • Scope: this only supplies the existing explicit base to runner-workspace publication. It does not alter WP Codebox fallback behavior or any other workspace fields.

Tests

  1. Run php tests/validate-docs-agent-packages.php (passed).
  2. Run php -l tests/validate-wp-codebox-run-agent-task-contract.php (passed).
  3. Run jq -cn --arg repo 'Automattic/example' --arg branch 'docs-agent/docs-upkeep' --arg baseRef trunk '{enabled:true,repo:$repo,clone_url:("https://github.com/" + $repo + ".git"),branch:$branch,branch_prefix:$branch,base:$baseRef,from:("origin/" + $baseRef)}' | jq -e '.base == "trunk" and .from == "origin/trunk"' (passed).
  4. Run WP_CODEBOX_DIR=/path/to/wp-codebox php tests/validate-wp-codebox-run-agent-task-contract.php with the declared v0.12.27 checkout. This is currently blocked before Docs Agent assertions because that release lacks contracts/run-agent-task-reusable-workflow-interface.v1.json; the validation gate was not bypassed or changed.

Compatibility

Consumers that omit base_ref retain the default main. Consumers that explicitly set a non-main base such as trunk now use it consistently for both runner-workspace publication and origin/trunk materialization.

AI Assistance

Assisted by openai/gpt-5.6-terra.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant