Skip to content

Commit dc60534

Browse files
authored
Use WP Codebox v0.12.7 release (#128)
1 parent 0dfe225 commit dc60534

6 files changed

Lines changed: 14 additions & 10 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.6](https://github.com/Automattic/wp-codebox/releases/tag/v0.12.6) workflow and passes the matching `wp_codebox_release_ref: v0.12.6` input. WP Codebox validates that the paired tags match, resolves the release tag, verifies its package version, and transports the native task result through controlled `.codebox` result files before publishing the workflow result. See [WP Codebox #1759](https://github.com/Automattic/wp-codebox/issues/1759). Regression reference: [run `29296787203`](https://github.com/Automattic/wp-codebox/actions/runs/29296787203).
15+
Docs Agent consumes the released [WP Codebox v0.12.7](https://github.com/Automattic/wp-codebox/releases/tag/v0.12.7) workflow and passes the matching `wp_codebox_release_ref: v0.12.7` input. WP Codebox validates that the paired tags match, resolves the release tag, verifies its package version, and transports the native task result through controlled `.codebox` result files before publishing the workflow result. The native task request carries WP Codebox's versioned sandbox tool-policy snapshot, keeping runtime-visible tools explicit. See [WP Codebox #1759](https://github.com/Automattic/wp-codebox/issues/1759). Regression reference: [run `29298164272`](https://github.com/Automattic/wp-codebox/actions/runs/29298164272).
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.6
238+
uses: Automattic/wp-codebox/.github/workflows/run-agent-task.yml@v0.12.7
239239
with:
240-
wp_codebox_release_ref: v0.12.6
240+
wp_codebox_release_ref: v0.12.7
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.6
20+
ref: v0.12.7
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.6';
199+
$generic_codebox_agent_task_workflow = 'uses: Automattic/wp-codebox/.github/workflows/run-agent-task.yml@v0.12.7';
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.6' ), 'maintain-docs.yml must pass the matching WP Codebox release tag.' );
203+
$assert( str_contains( $maintain_docs_workflow, 'wp_codebox_release_ref: v0.12.7' ), '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.6' ), 'Workflow README must record the WP Codebox release tag.' );
239+
$assert( str_contains( $workflow_readme, 'v0.12.7' ), '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
@@ -72,6 +72,10 @@
7272
$assert( str_contains( $producer_execute, '"--result-file", nativeResultPath' ), 'WP Codebox producer must pass the native result-file argument.' );
7373
$assert( str_contains( $producer_execute, 'const nativeResultPath = join(controlledCodeboxPath, "native-agent-task-result.json")' ), 'WP Codebox producer must constrain the native result path to .codebox.' );
7474
$assert( str_contains( $producer_execute, 'const resultPath = join(workspace, ".codebox", "agent-task-workflow-result.json")' ), 'WP Codebox producer must write the workflow result at the declared path.' );
75+
$assert( str_contains( $producer_execute, 'sandbox_tool_policy: {' ), 'WP Codebox producer must include an explicit sandbox tool-policy in the native task request.' );
76+
$assert( str_contains( $producer_execute, 'schema: "wp-codebox/sandbox-tool-policy/v1"' ), 'WP Codebox producer sandbox tool-policy must use the published schema.' );
77+
$assert( str_contains( $producer_execute, 'version: 1' ), 'WP Codebox producer sandbox tool-policy must declare its contract version.' );
78+
$assert( str_contains( $producer_execute, 'tools: runnerWorkspaceTools.map((id) => ({ id, runtime_tool_id: id, execution_location: "parent", transport_visibility: "visible", allowed: true' ), 'WP Codebox producer sandbox tool-policy must preserve the allowlisted parent tool mapping.' );
7579
$assert( 'wp-codebox/agent-task-workflow-result/v1' === ( $producer_result['schema'] ?? null ), 'WP Codebox workflow-result fixture schema mismatch.' );
7680
$assert( 'skipped' === ( $producer_result['status'] ?? null ), 'WP Codebox workflow-result fixture must model the skipped contract.' );
7781
$assert( '.codebox/agent-task-request.json' === ( $producer_result['request_path'] ?? null ), 'WP Codebox workflow-result fixture request path mismatch.' );
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"tag": "v0.12.6",
3-
"package_version": "0.12.6",
4-
"run": "29296787203",
2+
"tag": "v0.12.7",
3+
"package_version": "0.12.7",
4+
"run": "29298164272",
55
"native_result_path": ".codebox/native-agent-task-result.json",
66
"workflow_result_path": ".codebox/agent-task-workflow-result.json"
77
}

0 commit comments

Comments
 (0)