Skip to content

Auditing a project version

A project version is immutable: once built, the code, the flow and the policy it names never change, and every run of it names the same hashes. What changes around a version is recorded: when it was built and from what, when it was deployed and where, when traffic moved to it and away from it, who moved it and why. This page covers the records that describe a version's life, how two versions are compared, and how to find what ran on one.

A version's life on the record

flowchart TB
  B["Build<br/>build.create, build.report"]
  R[("Signed recipe<br/>project authoring, execution composition,<br/>resolved policy")]
  D["Deploy<br/>project.apply, project.deploy"]
  E[("Deploy evidence<br/>project.runtime_deploy_evidence.v1")]
  P["Promote<br/>project.release_route.set"]
  RB["Roll back<br/>project.rollback"]
  S["Stop<br/>serve_stop, finalizer"]
  B --> R --> D --> E --> P
  P --> RB
  P --> S
  RB --> P

Every step is an audited act with an actor, and every step that moves traffic records the route before and after.

Step Record Holds
Build build.create, build.report audit records; the signed recipe What was requested, by whom, and the recipe the build produced: project-authoring provenance, pinned block hashes, the compiled execution composition and the resolved policy
Deploy project.apply, project.deploy audit records; the node's deploy evidence What was deployed, and what your cluster ran for it
Promote project.release_route.set audit record, history entry, promoted event The previous and next target versions, the reason, the transition mode, the actor, the new route generation and hash
Roll back project.rollback audit record The version rolled back from and to, and the actor
Stop History entry; the node's teardown evidence That the version stopped serving, and what the node removed

See The CP recipe, Deployment reconciliation and Versioned release routes and bindings.

Reading a project's record

xratu obs audit project orders
xratu obs history project orders

The audit listing filters by actor, resource, action and run; the history listing by category, kind and actor. A promotion reads as one audit record with the route before and after:

{
  "actor": "user:dana",
  "action": "project.release_route.set",
  "resource": "project:orders",
  "before": {"target_version": "1.3.0", "route_generation": 11},
  "after": {
    "target_version": "1.4.0",
    "route_generation": 12,
    "selection_reason": "promote after soak"
  }
}

Comparing two versions

Two versions differ exactly where their recipes differ, and the recipes name everything by hash:

Difference Visible as
A block changed A different capsule digest for that block
Project authoring changed execution Different authoring provenance and a different compiled project execution composition
The policy changed A different resolved policy hash, and different bundle versions
A dependency changed A different resolved runtime closure

Run fingerprints bind the resulting project execution composition and governing policy. Authoring hashes remain reachable provenance rather than becoming kernel execution selectors, so two versions that compile to the same native execution and law can be compared without coupling the kernel to one authoring form. See Version pinning and drift.

What ran on a version

Every run records the project name and version it ran under, and every report a node made for the version carries the release route generation and hash it acted under. The runs of a version, and the route state each ran under, are therefore a query over records: the project's history lists each run with the version it ran, and each run's audit and history carry the rest.

xratu obs history project orders

A run started on a version finishes on that version even when the route moves during it, and the control plane refuses a report made under a route that has since moved. See Integrity at every layer.