Expand description
The enforce-mode escalation engine (SPEC §7.1) — the crown jewel.
Cheapest rung first: call the model, gate the output, serve the first output that passes;
escalate exactly one rung on gate failure, up to a ladder/budget/max_rungs ceiling. A
failover-eligible provider error (transport / 5xx) abstains and moves to the next rung — so
cross-provider failover falls out of the same loop (§7.2). This is the real-typed, async
version of the Firstpass policy proven in firstpass-bench; the semantics are identical.
Structs§
- Enforce
Ctx - Everything the engine needs for one decision. Borrowed to avoid cloning the ladder/request
per call; owned trace-context strings so the resulting
Traceis self-contained.
Enums§
- Engine
Outcome - The outcome of an enforce-mode routing decision.
Functions§
- route_
enforce - Run the enforce-mode ladder and produce both the outcome and its audit trace.