#[non_exhaustive]pub enum BoundGraphError {
GrantViolation {
step: StepId,
requested: Box<GrantAtom>,
permitted: Box<GrantSet>,
},
BudgetExceeded {
step: StepId,
unit: &'static str,
used: u64,
reserved: u64,
},
EvidenceRejected {
step: StepId,
reason: String,
},
DisjointnessUnproven {
left: Box<GrantAtom>,
right: Box<GrantAtom>,
},
SandboxError {
step: StepId,
detail: String,
},
ProviderError {
provider: String,
detail: String,
retryable: bool,
},
LedgerChainBroken {
seq: u64,
expected: Digest,
found: Digest,
},
Canonical(CanonicalError),
ContextOverBudget(ContextOverBudget),
}Expand description
Anything that can go wrong inside the governed span.
Variants are grouped by what a caller would do about them, which is what
recover matches on.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
GrantViolation
A step requested authority it does not have. Law I.
Most of these are caught at compile time (US-0403); this is the runtime case, where a template resolved to something outside its envelope.
Fields
BudgetExceeded
A step ran out of budget. Law II, economically.
Catchable by recover, which is the point: degrade to a cheaper model,
return a partial result, or escalate to a human.
Fields
EvidenceRejected
A commit was refused because evidence did not permit it. Law III.
Fields
DisjointnessUnproven
Two parallel branches could not be proved not to interfere.
Conservative by default: unprovable is a refusal, never an assumption.
SandboxError
The sandbox could not run a tool, or the tool failed inside it.
ProviderError
A model provider failed.
Fields
LedgerChainBroken
The ledger’s hash chain does not verify — tampering or corruption.
Fields
Canonical(CanonicalError)
A value could not be canonically encoded or decoded.
ContextOverBudget(ContextOverBudget)
An admission produced a context over its own ceiling.
Implementations§
Source§impl BoundGraphError
impl BoundGraphError
Sourcepub fn grant_violation(
step: StepId,
requested: GrantAtom,
permitted: GrantSet,
) -> Self
pub fn grant_violation( step: StepId, requested: GrantAtom, permitted: GrantSet, ) -> Self
A step asked for authority beyond its grant.
Sourcepub fn disjointness_unproven(left: GrantAtom, right: GrantAtom) -> Self
pub fn disjointness_unproven(left: GrantAtom, right: GrantAtom) -> Self
Two branches could not be proved disjoint.
Sourcepub fn step(&self) -> Option<StepId>
pub fn step(&self) -> Option<StepId>
Which step this failure belongs to, where that is meaningful.
Whole-graph failures such as
DisjointnessUnproven have no single step
and return None.
Sourcepub fn class(&self) -> &'static str
pub fn class(&self) -> &'static str
A stable machine-readable class, for recover and the Python bindings.
Stable across releases: these strings are API.
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Whether retrying or failing over could plausibly succeed.
A grant violation never becomes permitted by retrying; a rate-limited provider might.
Trait Implementations§
Source§impl Debug for BoundGraphError
impl Debug for BoundGraphError
Source§impl Display for BoundGraphError
impl Display for BoundGraphError
Source§impl Error for BoundGraphError
impl Error for BoundGraphError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()