pub fn decide(
snapshot: &Snapshot,
request: &ReplayRequest,
rate_counter: &mut SimulatedCounter,
) -> ReplayDecisionExpand description
The pure decision function (DW-102). Re-runs the gateway’s decision
path — route match, authz, simulated rate limit, transform
resolution, upstream pick — against snapshot for request, with
NO I/O and NO side effects on live gateway state. The
rate_counter is the ONLY mutable state touched, and it is a
simulated counter the caller owns (not the live limiter).
Returns a ReplayDecision describing what the live proxy WOULD
have decided at each stage. Stages after a miss (no route, authz
deny, rate-limit deny) are still reported when they can be computed
without side effects — an operator diffing two configs wants to see
“authz now denies” even when the live proxy would have stopped
there, so the diff surfaces the full picture.