Skip to content

Deterministic lowering

Workflow YAML is lowered deterministically into an IR over the closed primitive set, sealed with pinned block hashes and the frozen policy into a signed run-plan, and the kernel executes that run-plan. Every event the run produces carries a fingerprint of what was sealed. This page covers where the lowering happens, what the sealed run-plan contains, what the kernel checks before step one, and what comes out.

Sealed plan in, evidence out

flowchart TB
  subgraph CP["CONTROL PLANE"]
    direction TB
    SRC[("Workflow YAML,<br/>published block manifests")]
    COMP["Workflow compiler"]
    REC[("Signed recipe<br/>IR, hashes, frozen policy, exemptions")]
  end
  subgraph NODE["DATA PLANE NODE"]
    direction TB
    MAT["Materialisation<br/>fetch block bytes, verify hashes"]
  end
  REG[("Tenant registry")]
  subgraph XCK["KERNEL"]
    direction TB
    VAL{{"Run-plan validation"}}
    FP[("Run fingerprint<br/>fixed at run start")]
    EXE["Primitive execution"]
    EVD[("Evidence stream")]
  end
  SRC -->|"1. lowered"| COMP
  COMP -->|"2. sealed and signed"| REC
  REC -->|"3. assignment"| MAT
  REG -->|"4. block bytes"| MAT
  MAT -->|"5. sealed run-plan"| VAL
  VAL -->|"6. computed once"| FP
  VAL -->|"7. admitted"| EXE
  EXE -->|"8. every event, with the fingerprint"| EVD

The control plane works on symbols and hashes: Workflow compiler lowers the source into Signed recipe. Materialisation on the node fetches the block bytes from Tenant registry, checks them against the recipe's hashes and assembles the sealed run-plan. In the kernel, Run-plan validation admits the plan, Run fingerprint is fixed, and every event in Evidence stream carries it.

Lowering is fixed before the run

The compiler lowers structured YAML into a deterministic graph over the closed primitive set: the same source with the same pinned versions produces the same IR. Types are settled at publish. Every bind: and save: path is checked against the published manifests of the blocks it references, a type mismatch is a build error, and a workflow is published only when the control plane knows every block version it references.

What the sealed run-plan contains

Part Produced by Checked at run start
Compiled flow IR The workflow compiler on the control plane Every operation is in the closed set
Pinned block artifact hashes The control plane at publish; bytes verified by the node at materialisation The hashes match the sealed manifest
Frozen effective policy per step Control-plane merge, most-restrictive-wins Covered by the signature
Signed exemptions for the run The control plane at build Passed to the evaluator as data
Manifest and signature chain The control plane signs the whole The signature verifies

A run-plan whose signature fails, whose hashes disagree or whose IR leaves the closed set is rejected before any step runs.

The run fingerprint

The kernel computes the fingerprint once, at run start, and it is immutable for the run:

The fingerprint binds the compiled project execution composition, qualified target/interface/capsule/closure identities, frozen effective policy, contributing policy-bundle versions and signed exemptions.

Every PolicyDecision, every primitive event, every suspend and every error references it, and the evidence stream is ordered, monotonic and append-only. Two runs with the same fingerprint ran the same law over the same code. See The run fingerprint.