diff --git a/scripts/conformance/child-workflows-runtime-probe.php b/scripts/conformance/child-workflows-runtime-probe.php index 1d68a312..775d48b1 100644 --- a/scripts/conformance/child-workflows-runtime-probe.php +++ b/scripts/conformance/child-workflows-runtime-probe.php @@ -267,10 +267,21 @@ function cw_require_child_event(array $history, string $eventType, string $child throw new RuntimeException(sprintf('%s did not reference child run %s', $eventType, $childRunId)); } +/** @return array */ +function cw_capability_manifest(): array +{ + return array_fill_keys(WorkerProtocol::PORTABLE_WORKER_AFFINITY_CAPABILITIES, [ + 'supported' => false, + 'minimum_protocol_version' => WorkerProtocol::PORTABLE_WORKER_AFFINITY_MINIMUM_PROTOCOL_VERSION, + 'reason' => 'not_implemented', + ]); +} + /** @param list $types */ function cw_register(string $workerId, string $queue, string $runtime, array $types): void { cw_request('POST', '/worker/register', [ + 'capability_manifest' => cw_capability_manifest(), 'worker_id' => $workerId, 'task_queue' => $queue, 'runtime' => $runtime === 'workflow-php' ? 'php' : 'python', diff --git a/tests/Unit/ChildWorkflowRuntimeContractTest.php b/tests/Unit/ChildWorkflowRuntimeContractTest.php index ffd75956..a4db1124 100644 --- a/tests/Unit/ChildWorkflowRuntimeContractTest.php +++ b/tests/Unit/ChildWorkflowRuntimeContractTest.php @@ -355,6 +355,14 @@ public function test_published_artifact_runner_routes_every_unexecuted_child_wor $this->assertStringContainsString('output_sample', $installProbe); $this->assertStringContainsString('WorkflowFiberRunner::forClass(', $runtimeProbe); $this->assertStringContainsString('cw_failure_cell(', $runtimeProbe); + $this->assertStringContainsString( + "'capability_manifest' => cw_capability_manifest(),", + $runtimeProbe, + ); + $this->assertStringContainsString( + 'WorkerProtocol::PORTABLE_WORKER_AFFINITY_CAPABILITIES', + $runtimeProbe, + ); $this->assertStringContainsString( '$parentRuntimeResult = $parentResume[\'observation\'][\'runtime_result\'] ?? null;', $runtimeProbe,