Traces & replay
The trace schema, how replay reproduces a decision, and the conformance guarantee.
Trace schema
Every completion carries a trace: a structured, replayable record of how the model was chosen. It is the proof object, which models were considered, why each passed or failed, what was used, and how to reproduce it.
301140696-1054914287; identical terms share it. Full identity is a host-side sha256 of the canonical encoding.{ model_family, served_model_id, price_in, price_out } for the model that served the call.{ provider, model_family, served_model_id, tier, price_out, score }. The first is the pick; the rest are the cascade.{ model_family, reason }, e.g. cmp bench_intelligence ge 0.5.{ event, provider_id, attempt, latency_ms, error_kind? }. Every failover hop is an attempted entry here.flow_fingerprint and flow_nodes[], one trace per node.Replay. Identity is the sha256 of the policy's canonical encoding, so given the trace and the catalog snapshot the same policy and inputs reproduce the same decision, on the host or your own machine.
Conformance
A policy should mean the same thing wherever it runs. Canonical encoding, an sha256 identity, the reference interpreter, and a shared set of golden vectors are what hold that together.
same policy = same inputs = same catalog = same seed = same result. The semantics use only correctly-rounded arithmetic, so a conforming host replays the golden vectors (tests/golden/sigma_pol_v2.json in the engine repo) and reproduces every decision bit-for-bit. Identical terms encode to identical bytes and therefore share one sha256 identity across hosts.