Offline
Attempts become evidence
Raw events are reconstructed into one row per authorization attempt, then aggregated into approval tables over a four-level segment hierarchy: channel × funding × issuer × amount band at the finest, channel alone at the coarsest. The channel is never dropped — user-present and off-session are different worlds.
Every cell is scored with a Wilson 95% lower bound, so a segment with three approvals out of three is not a 100% segment. Thin evidence is penalized instead of trusted, without needing a separate confidence rule bolted on.
Online
Decide, then plan the retry
Per provider, the engine walks the hierarchy from finest to coarsest until it finds a segment with enough support, scores expected_net = wilson × amount × (1 − fee), and picks. The fee tolerance knob sets how many percentage points of approval an operator will trade for a cheaper provider; providers marked down are excluded before scoring.
Routing and retry are separate decisions. The retry state machine keys on the last decline's class and on whether a user is in the loop, so a funding problem waits on the same provider while a step-up authentication moves channels.
Edges
Where a model belongs
A model deciding where to send $450 does not pass latency or audit. A model translating "05 Do not honor" into a class the state machine already understands does — and that translation is measurable, so it is covered by an eval with a committed baseline and a hallucination gate.
An MCP server exposes the same engine as tools, so an operations analyst can ask an agent why a charge went where it went, and what changes if a provider drops.
MCP.md
evals