Expand description
The audit trace (SPEC §9.1) — the tamper-evident record of one routing decision.
A trace captures why a request went where it did and what it cost: the features it was
routed on, every attempt and its gate verdicts, the final served outcome, and the savings
versus always calling the top rung. Each record links to the previous via Trace::prev_hash
(see crate::hashchain), so the log is append-only and any tampering is detectable.
The serde field names in this module are the wire/audit contract. External auditors parse them and re-derive the hash chain; renaming one is a breaking change that requires a schema/version bump, never a silent edit.
Structs§
- Attempt
- One attempt at a rung: the model call plus the gates run against its output.
- Deferred
Verdict - A verdict that arrived after the response was served (deferred gate or downstream feedback).
- Elastic
Decision - Why elastic verification (ADR 0008 Phase 3) skipped or ran the expensive gates on the served rung — recorded so an auditor can see why verification was skipped and check the conformal bound authorized it. Absent when elastic is off (the default), keeping pre-elastic traces byte-identical and hash-chain compatible.
- Final
Outcome - The final outcome and economics of a decision.
- Policy
Ref - Reference to the policy that produced a decision.
- Probe
Signal - The shadow-probe signal recorded on a sampled receipt (ADR 0008 Phase 1). Records the k-sample gate-pass-count signal and its cost separately from the served cost, so savings math is clean.
- Request
Info - The routed request, described without its raw content.
- Rollout
Record - to pre-rollout traces and hash-chain compatible.
- Shadow
Signal - The rollout arm this request landed in (ADR 0009 D1), recorded so an auditor can re-derive arm membership from the receipt alone. Absent when the route has no rollout — byte-identical What Firstpass would have done for an observed request (ADR 0009 D2).
- Trace
- A single routing decision, start to finish.
Enums§
- Elastic
Action - The action elastic verification (ADR 0008 Phase 3) took on the served rung.
- Probe
Regime - Regime classification from the k-sample visible-pass count (ADR 0008).
- Served
From - Where the served response came from.