pub enum EffectViolation {
DeclarationMismatch {
kind: String,
marker: Effect,
declared: Effect,
},
MissingIdempotencyKey {
kind: String,
},
MissingCompensation {
kind: String,
},
MissingApproval {
kind: String,
effect_id: EffectId,
},
ApprovalScopeMismatch {
kind: String,
required: EffectId,
presented: EffectId,
},
ShadowRefused {
kind: String,
effect: Effect,
effect_id: EffectId,
},
}Expand description
Why the kernel refused an admission decision.
A dedicated error type (not crate::error::RustyError) because these
are contract violations surfaced by the typed API, not runtime execution
failures; the executor maps them into its own error path when the
enforcement wave lands.
Variants§
DeclarationMismatch
The marker trait and TypedEffect::EFFECT disagree — a type-level
bug, caught at the enforcement point rather than trusted.
Fields
MissingIdempotencyKey
An IdempotentEffect presented for retry admission without the
idempotency key the declaration is meaningless without.
MissingCompensation
A CompensatableEffect with no rollback handler registered for its
kind.
MissingApproval
An IrreversibleEffect presented for execution with no approval
token at all.
Fields
ApprovalScopeMismatch
A token was presented, but it approves a different effect id — an approval is scoped to exactly one effect occurrence and is not transferable.
Fields
ShadowRefused
An effect above Effect::ReadOnly was attempted under a shadow
admission context (R0.12 Operations Plane, wave 4). The shadow’s
whole promise is that the candidate’s effects never reach the
world, and “idempotent” means safe to retry under one key — not
safe to execute twice from two revisions — so Idempotent is
refused alongside the classes above it. The violation carries the
classification and the derived id because it is evidence, not a
stack trace: the shadow’s report shows which effects the candidate
would have attempted, classified, never executed.
Trait Implementations§
Source§impl Clone for EffectViolation
impl Clone for EffectViolation
Source§impl Debug for EffectViolation
impl Debug for EffectViolation
Source§impl Display for EffectViolation
impl Display for EffectViolation
impl Eq for EffectViolation
Source§impl Error for EffectViolation
impl Error for EffectViolation
1.30.0 · 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()