|
307 | 307 | $assert( in_array( '.codebox/agent-task-request.json', $producer_upload_regression['observed']['uploaded'] ?? array(), true ), 'WP Codebox upload regression fixture must retain the controlled request upload.' ); |
308 | 308 | $assert( ! array_intersect( array( 'MODEL_PROVIDER_SECRET_1', 'MODEL_PROVIDER_SECRET_2', 'MODEL_PROVIDER_SECRET_3', 'MODEL_PROVIDER_SECRET_4', 'MODEL_PROVIDER_SECRET_5' ), array_keys( $caller_secrets ) ), 'Docs Agent must forward only the OPENAI_API_KEY provider secret name.' ); |
309 | 309 |
|
310 | | -$assert( str_contains( $workflow, 'output_projections="$(jq -cn --arg path \'metadata.runner_workspace_publication.url\' --argjson required "$success_requires_pr" \'{docs_agent_publication:{path:$path,required:$required}}\')"' ), 'Docs Agent must define the v0.12.27 publication projection descriptor.' ); |
| 310 | +$assert( str_contains( $workflow, 'output_projections="$(jq -cn --arg path \'metadata.runner_workspace_publication.pull_request.url\' --argjson required "$success_requires_pr" \'{docs_agent_publication:{path:$path,required:$required}}\')"' ), 'Docs Agent must define the v0.12.27 publication projection descriptor.' ); |
311 | 311 | $docs_projections = array( |
312 | 312 | 'docs_agent_publication' => array( |
313 | | - 'path' => 'metadata.runner_workspace_publication.url', |
| 313 | + 'path' => 'metadata.runner_workspace_publication.pull_request.url', |
314 | 314 | 'required' => true, |
315 | 315 | ), |
316 | 316 | ); |
317 | 317 | $publication_descriptor = $docs_projections['docs_agent_publication'] ?? null; |
318 | 318 | $assert( is_array( $publication_descriptor ), 'Docs Agent must define the docs_agent_publication projection descriptor.' ); |
319 | 319 | $publication_path = $publication_descriptor['path'] ?? null; |
320 | | -$assert( 'metadata.runner_workspace_publication.url' === $publication_path, 'Docs Agent publication projection must use the v0.12.27 runner workspace publication URL path.' ); |
| 320 | +$assert( 'metadata.runner_workspace_publication.pull_request.url' === $publication_path, 'Docs Agent publication projection must use the v0.12.27 runner workspace publication pull request URL path.' ); |
321 | 321 |
|
322 | | -$producer_request_fixture = $read_json( rtrim( $wp_codebox_dir, '/' ) . '/contracts/agent-task-workflow-request.fixture.json' ); |
323 | | -$producer_projection_paths = array_values( $producer_request_fixture['outputs']['projections'] ?? array() ); |
324 | | -$assert( in_array( $publication_path, $producer_projection_paths, true ), 'Docs Agent publication projection must match a WP Codebox producer fixture projection path.' ); |
| 322 | +$assert( 'string' === ( $contract['inputs']['output_projections']['type'] ?? null ), 'WP Codebox must accept Docs Agent custom output projections.' ); |
325 | 323 |
|
326 | 324 | $runtime_result_fixture = $read_json( $root . '/tests/wp-codebox-runtime-result.fixture.json' ); |
327 | 325 | $publication_url = $result_value( $runtime_result_fixture, $publication_path ); |
|
0 commit comments