Skip to content

BudgetVerdict

@final
class BudgetVerdict

A report’s total judged against a budget: core’s Budget::check, the verdict microvm cost --max-cost renders.

BudgetVerdict declares no __new__ or __init__, so it is not constructed directly: an instance comes back from another call in this package.

aborts: bool

Whether the caller’s judgement refuses the report: breached, under "abort".

basis: str

"exact" or "lower-bound".

breached: bool

Whether the floor is over the ceiling. At the ceiling is within it.

floor: EstimatedUsd

The total’s floor: the whole estimate unless is_lower_bound.

is_lower_bound: bool

Whether the floor is a lower bound, because a line is unpriced.

max_usd: EstimatedUsd

The ceiling, as the caller wrote it.

on_breach: str

"warn" or "abort": what the caller said a breach does.

overage: EstimatedUsd | None

How far over the ceiling the floor is, when breached; at least that much for a lower bound.

unpriced_phases: list[str]

The phases whose lines are unpriced, sorted.

def render() -> str

One line for a human, the one microvm cost --max-cost prints.

def to_dict() -> dict

Core’s JSON shape for the verdict, as a dict: maxUsd, onBreach, basis, breached, overageAtLeastUsd.

def __repr__() -> str

This page is generated from bindings/microvms-py/microvms.pyi by Griffe 2.3.0, run from site/scripts/gen-reference.mjs on every pnpm run sync, so an edit made here is overwritten by the next run.

To change the page, change the doc comment in the binding’s Rust source, then regenerate the declarations with mise run stubs. mise run stubs:check fails when the committed file no longer matches the source.