Skip to content

Governance and policy enforcement

Governance in Xratu is decided once and enforced at runtime. The control plane resolves the policy a run is governed by when the project is built, and the kernel enforces it as a hard gate at every call the run makes. The node sits between the two: it verifies that what it received is intact and belongs to it, seals the resolved policy into the run-plan unchanged, and carries the kernel's decisions, evidence and scores back. This section covers each of those responsibilities.

Who does what

flowchart TB
  subgraph CP["CONTROL PLANE"]
    direction LR
    RES["Resolves and signs policy<br/>once, at build"]
    ADM["Checks every report's<br/>policy digest"]
  end
  subgraph NODE["NODE"]
    direction TB
    subgraph GD["GUARDS, before the kernel"]
      direction LR
      G1{{"Workload identity"}}
      G2{{"Artifact integrity"}}
      G3{{"Resolver runtime"}}
      G4{{"Determinism parity"}}
    end
    SEAL["Seals the resolved policy<br/>into the run-plan"]
    PROJ["Projects decisions, evidence,<br/>scores and telemetry"]
    GD --> SEAL
  end
  subgraph KRN["PROJECT KERNEL"]
    direction TB
    HK{{"Six hooks, nine effects<br/>the only enforcement point"}}
    PD[("PolicyDecision records")]
    HK --> PD
  end
  RES -->|"assignment with digest"| GD
  SEAL -->|"sealed run-plan"| HK
  PD -->|"return lane"| PROJ
  PROJ -->|"stamped with policy digest"| ADM

The node's guards check the assignment against the node and against itself: the node's identity, the artifacts' digests, the runtime facts' fingerprint, and the consistency of the model-runtime controls. Each stops a run before any cell starts, with its own code and an assignment.blocked event. The rules of the policy itself are evaluated only by the kernel, from the sealed run-plan, and every decision returns as evidence.

In this section