Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 1.07 KB

worker-command-contracts.md

File metadata and controls

20 lines (16 loc) · 1.07 KB

Worker command declarations

Workers can advertise workflow_command_contracts, keyed by workflow type, during registration. Each entry describes that workflow's queries, signals and updates, including any handler parameter contracts and update validators.

An explicitly supplied empty entry declares that the workflow has no commands. The Server retains it when admitting a workflow from the selected worker cohort. Bounded run observations then report an empty contract with source=durable_history and backfill_needed=false.

Omitting a workflow's entry leaves its contract unavailable. A missing or null top-level map preserves this legacy behavior. Null entries, malformed command lists and unnamed handler contracts return HTTP 422 during registration.

The declaration must match the run's namespace, task queue, workflow type and selected build cohort. A later registration applies to new admissions and preserves the original run's durable snapshot. Existing runs with missing metadata remain unavailable until an explicit supported recovery can establish their original contract.