Skip to content

The worker reconcile pipeline

Inside the worker budget, each flow-execution assignment passes the same ordered pipeline: the node's guards, then the kernel, then the evidence and the report. Each guard can block, and a block carries which guard produced it, so an assignment that did not run says why without inference. The policy that governs the run itself is enforced by the kernel.

The order

flowchart TB
  A["Admit runtime resolution<br/>from the resolver snapshot"]
  B["Resolve the idempotency contract"]
  C["Determinism guard"]
  D["Hand the sealed execution handoff to the kernel"]
  E["Kernel runs the step<br/>policy enforced at its hooks"]
  F["Project evidence and decisions"]
  G["Report, release the lease"]
  A --> B --> C --> D --> E --> F --> G

What each step reads

flowchart TB
  subgraph AS["ASSIGNMENT, as pulled"]
    direction TB
    RS[("Resolver snapshot")]
    IC[("Idempotency contract")]
    DC[("Determinism contract")]
    PS[("Effective policy<br/>and digest")]
  end
  subgraph PIPE["WORKER SLOT"]
    direction TB
    G1{{"Resolution admitted"}}
    G2{{"Idempotency"}}
    G3{{"Determinism guard"}}
    HO["Sealed execution handoff"]
    G1 --> G2 --> G3 --> HO
  end
  K["Kernel<br/>six hooks"]
  OB[("Outbox<br/>reports stamped with the policy digest")]
  RS --> G1
  IC --> G2
  DC --> G3
  PS --> HO
  HO --> K
  K -->|"decisions and evidence"| OB

Every guard reads one section of the assignment, so a block is explained by the section that guard read. The effective policy is read by no guard: it goes into the sealed execution handoff unchanged, and the kernel evaluates it at every call.

Resolution is admitted before any guard runs, so the guards check what the assignment actually resolved to rather than what it asked for. See The resolver runtime.

The context every guard sees

assignment_id, workspace_uuid, run_id, node_id, attempt, trace_id
timeout_ms            from the invocation's execution contract
deadline_epoch_ms     from the assignment
idempotency_key       the effective key the contract resolved

The same context goes to every guard, so two guards checking the same assignment agree on what they are checking. The correlation tuple is in it, so a guard's outcome joins to everything else the run produced.

A block names its guard

A blocked assignment reports a status of blocked, the guard that blocked it, and the guard's own detail: its stage, a code, a reason and evidence. A block reason of determinism_gate means the determinism contract was inconsistent or incomplete; see Determinism enforcement adapter. The resolver fingerprint and the idempotency contract travel on the block too, so a blocked assignment records what it would have run as well as why it stopped.

The guards apply what was resolved

The determinism contract and the effective policy both arrive on the assignment, already resolved and digested by the control plane. The node's guards check that what arrived is complete and consistent, and the kernel enforces the policy's rules. A surprising block or policy decision is therefore explained by reading the assignment and the decision records rather than the node's configuration. See The policy enforcement adapter and Effective policy computation and provenance.

Idempotency is resolved before the guards

The effective idempotency key is resolved early and carried through, so the key the guards see is the key the invocation will use. That pairs with the admission gate in the control plane, which refuses a retry budget on a non-idempotent step at publish time. See Admission gates.

Reports carry the policy digest

Every progress and complete report for the run carries the policy digest and its stage, pre before invocation and post after, and the control plane refuses a report whose digest differs from the one it issued. See Policy snapshot and digest enforcement.