Skip to main content

assert_budget_passthrough

Function assert_budget_passthrough 

Source
pub async fn assert_budget_passthrough(db: &Arc<dyn Database>)
Expand description

Proves the pass-through half of the outbound budgets (issue #765): a router that answers None governs nothing — the request reaches the inner client verbatim (method, URI, headers, body and the request extensions an Idempotent marker rides in), the response passes back untouched, and the budget store stays empty because nothing was spent: no bucket row, no quota row, no sleeper wait.

Runs its own probe tables, so it can be called against any adapter with a writable connection.

§Panics

Panics when the pass-through contract is violated: the inner client sees a request other than the one sent, the response is rewritten, a budget row or a sleeper wait appears, or the probe tables cannot be created on the given connection.