Skip to content

Commit 56910aa

Browse files
authored
Use WP Codebox v0.12.5 release (#126)
1 parent 272ab90 commit 56910aa

6 files changed

Lines changed: 14 additions & 9 deletions

File tree

.github/workflows/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The reusable workflow declares the expected typed review artifacts for Docs Agen
1212

1313
The target repository grants `contents: write`, `pull-requests: write`, and `issues: write`. Docs Agent forwards the caller-scoped `${{ github.token }}` to WP Codebox for same-repository publication, so consumers do not configure `ACCESS_TOKEN`. `OPENAI_API_KEY` is an optional workflow secret and is required only for a live OpenAI run; skipped and dry-run calls do not require it. `EXTERNAL_PACKAGE_SOURCE_POLICY` remains a separate required v1 JSON secret that authorizes only the selected public standalone Docs Agent package. Both secrets are forwarded to WP Codebox without serialization into the task descriptor.
1414

15-
Docs Agent consumes the released [WP Codebox v0.12.4](https://github.com/Automattic/wp-codebox/releases/tag/v0.12.4) workflow and passes the matching `wp_codebox_release_ref: v0.12.4` input. WP Codebox validates that the paired tags match, resolves the release tag, and verifies its package version before running the task. See [WP Codebox #1759](https://github.com/Automattic/wp-codebox/issues/1759).
15+
Docs Agent consumes the released [WP Codebox v0.12.5](https://github.com/Automattic/wp-codebox/releases/tag/v0.12.5) workflow and passes the matching `wp_codebox_release_ref: v0.12.5` input. WP Codebox validates that the paired tags match, resolves the release tag, and verifies its package version before running the task. See [WP Codebox #1759](https://github.com/Automattic/wp-codebox/issues/1759). Regression reference: failed run `29295530010`.
1616

1717
## Docs Agent Runner Recipe
1818

.github/workflows/maintain-docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,9 @@ jobs:
235235
contents: write
236236
pull-requests: write
237237
issues: write
238-
uses: Automattic/wp-codebox/.github/workflows/run-agent-task.yml@v0.12.4
238+
uses: Automattic/wp-codebox/.github/workflows/run-agent-task.yml@v0.12.5
239239
with:
240-
wp_codebox_release_ref: v0.12.4
240+
wp_codebox_release_ref: v0.12.5
241241
external_package_source: ${{ needs.prepare.outputs.external_package_source }}
242242
workload_id: docs-agent-${{ inputs.audience }}-${{ inputs.run_kind }}
243243
workload_label: Run Docs Agent

.github/workflows/validate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/checkout@v4
1818
with:
1919
repository: Automattic/wp-codebox
20-
ref: v0.12.4
20+
ref: v0.12.5
2121
path: .wp-codebox
2222
- name: Validate Docs Agent
2323
env:

tests/validate-docs-agent-bundle.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,11 @@
196196

197197
$transitional_homeboy_extensions_workflow = 'uses: Extra-Chill/homeboy-extensions/.github/workflows/runtime-agent-full-run.yml@main';
198198
$forbidden_docs_agent_codebox_workflow = 'uses: Automattic/wp-codebox/.github/workflows/docs-agent-runner.yml@main';
199-
$generic_codebox_agent_task_workflow = 'uses: Automattic/wp-codebox/.github/workflows/run-agent-task.yml@v0.12.4';
199+
$generic_codebox_agent_task_workflow = 'uses: Automattic/wp-codebox/.github/workflows/run-agent-task.yml@v0.12.5';
200200
$assert( ! str_contains( $maintain_docs_workflow, $transitional_homeboy_extensions_workflow ), 'maintain-docs.yml must not call Homeboy Extensions directly.' );
201201
$assert( ! str_contains( $maintain_docs_workflow, $forbidden_docs_agent_codebox_workflow ), 'maintain-docs.yml must not call a Codebox-owned Docs Agent wrapper.' );
202202
$assert( str_contains( $maintain_docs_workflow, $generic_codebox_agent_task_workflow ), 'maintain-docs.yml must call the generic Codebox agent-task workflow.' );
203-
$assert( str_contains( $maintain_docs_workflow, 'wp_codebox_release_ref: v0.12.4' ), 'maintain-docs.yml must pass the matching WP Codebox release tag.' );
203+
$assert( str_contains( $maintain_docs_workflow, 'wp_codebox_release_ref: v0.12.5' ), 'maintain-docs.yml must pass the matching WP Codebox release tag.' );
204204

205205
$workflow_blocked_runtime_fragments = array_values( array_diff( $blocked_runtime_fragments, array( 'wp-codebox', 'Automattic/wp-codebox', 'OPENAI_API_KEY' ) ) );
206206
$workflow_internal_fragments = array_merge( $workflow_blocked_runtime_fragments, array( 'homeboy_extensions_ref:', 'runtime_ref:', 'runtime_ref }}', 'runtime_provider:', 'runtime_provider }}', 'runtime_profile:', 'runtime_profile }}', 'runtime_profiles:', 'runtime_profiles }}', 'runtime_execution:', 'runtime_execution }}', 'runtime_config:', 'runtime_config }}', 'component_contracts:', 'component_contracts }}', 'ability_requirements:', 'ability_requirements }}', 'runtime_components:', 'runtime_components }}', 'runtime_mounts:', 'runtime_mounts }}', 'required_abilities:', 'required_abilities }}', 'extra_wp_config_defines:' ) );
@@ -236,7 +236,7 @@
236236
foreach ( array( 'Docs Agent Runner Recipe', 'portable recipe', 'Docs Agent owns the native package' ) as $migration_note_text ) {
237237
$assert( str_contains( $workflow_readme, $migration_note_text ), "Workflow README missing agent runtime note: {$migration_note_text}" );
238238
}
239-
$assert( str_contains( $workflow_readme, 'v0.12.4' ), 'Workflow README must record the WP Codebox release tag.' );
239+
$assert( str_contains( $workflow_readme, 'v0.12.5' ), 'Workflow README must record the WP Codebox release tag.' );
240240
$assert( str_contains( $workflow_readme, 'https://github.com/Automattic/wp-codebox/issues/1759' ), 'Workflow README must link the WP Codebox release contract issue.' );
241241
$assert( str_contains( $workflow_readme, 'blocks concrete runner workflow calls' ), 'Workflow README must document blocked concrete runner calls.' );
242242
$assert( str_contains( $workflow_readme, 'runtime ability names, component paths, mount directives, provider defaults, and define directives' ), 'Workflow README must document blocked runtime substrate surfaces.' );

tests/validate-wp-codebox-run-agent-task-contract.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,15 @@
5151
$release_tag = $release['tag'] ?? null;
5252
$assert( is_string( $release_tag ) && preg_match( '/^v\d+\.\d+\.\d+$/', $release_tag ) === 1, 'WP Codebox release fixture must declare an exact release tag.' );
5353
$assert( substr( $release_tag, 1 ) === ( $release['package_version'] ?? null ), 'WP Codebox release fixture package version must match its tag.' );
54+
$failed_run = $release['failed_run'] ?? null;
55+
$assert( is_string( $failed_run ) && preg_match( '/^\d+$/', $failed_run ) === 1, 'WP Codebox release fixture must retain the failed-run regression reference.' );
5456
$producer_package = $read_json( rtrim( $wp_codebox_dir, '/' ) . '/package.json' );
5557
$assert( ( $release['package_version'] ?? null ) === ( $producer_package['version'] ?? null ), 'Checked-out WP Codebox package version must match the release fixture.' );
5658

5759
$workflow = (string) file_get_contents( $root . '/.github/workflows/maintain-docs.yml' );
5860
$assert( preg_match( '/^\s*uses: Automattic\/wp-codebox\/\.github\/workflows\/run-agent-task\.yml@' . preg_quote( $release_tag, '/' ) . '$/m', $workflow ) === 1, 'Docs Agent must call the released WP Codebox workflow tag.' );
61+
$workflow_readme = (string) file_get_contents( $root . '/.github/workflows/README.md' );
62+
$assert( str_contains( $workflow_readme, 'failed run `' . $failed_run . '`' ), 'Workflow documentation must retain the failed-run regression reference.' );
5963

6064
preg_match( '/uses: Automattic\/wp-codebox\/\.github\/workflows\/run-agent-task\.yml@[^\n]+\n with:\n(?<inputs>.*?)\n secrets:\n(?<secrets>(?: [^\n]*\n?)*)/s', $workflow, $caller );
6165
$assert( isset( $caller['inputs'], $caller['secrets'] ), 'Docs Agent must declare producer inputs and secrets.' );
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2-
"tag": "v0.12.4",
3-
"package_version": "0.12.4"
2+
"tag": "v0.12.5",
3+
"package_version": "0.12.5",
4+
"failed_run": "29295530010"
45
}

0 commit comments

Comments
 (0)