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).
- Final
Outcome - The final outcome and economics of a decision.
- Policy
Ref - Reference to the policy that produced a decision.
- Request
Info - The routed request, described without its raw content.
- Trace
- A single routing decision, start to finish.
Enums§
- Served
From - Where the served response came from.