pub enum PromotionRefusal {
NotEvaluated {
candidate_id: CandidateId,
},
EvaluationMismatch {
candidate_id: CandidateId,
evaluation: CandidateId,
},
ReplayDiverged {
candidate_id: CandidateId,
divergences: usize,
},
EvaluationRegressed {
candidate_id: CandidateId,
},
DatasetVersionMismatch {
required: String,
evaluated: String,
},
ScopeNotAutoPromotable {
scope: MemoryScope,
},
InsufficientImprovement {
delta: Option<f64>,
required: f64,
},
RequiresApproval {
effect_id: EffectId,
},
ApprovalMismatch {
required: EffectId,
presented: EffectId,
},
}Expand description
Why a promotion was refused. A dedicated error type (the
crate::effects::EffectViolation precedent): refusals are contract
outcomes surfaced to the caller, not runtime failures — and a refused
promotion changes nothing.
Variants§
NotEvaluated
The candidate was never evaluated. Promotion is gated on evidence; there is no evidence-free path, not even with an approval — a human approves reviewed evidence, never a blank check.
Fields
candidate_id: CandidateIdThe candidate refused.
EvaluationMismatch
The evaluation on record is not this candidate’s.
Fields
candidate_id: CandidateIdThe candidate refused.
evaluation: CandidateIdThe candidate the journaled evaluation names.
ReplayDiverged
The replay half diverged: the candidate could not reproduce its recorded evidence.
Fields
candidate_id: CandidateIdThe candidate refused.
EvaluationRegressed
compare() flagged a regression beyond the declared thresholds.
Fields
candidate_id: CandidateIdThe candidate refused.
DatasetVersionMismatch
The envelope names a dataset version the evaluation did not run.
Fields
ScopeNotAutoPromotable
A memory_set candidate at a scope the auto rule does not cover.
Fields
scope: MemoryScopeThe scope that fell outside the rule.
InsufficientImprovement
The target metric did not improve past the declared bar.
Fields
RequiresApproval
The candidate falls outside the envelope’s auto paths: a human approval scoped to the named effect id is required.
Fields
effect_id: EffectIdThe effect id the approval must be scoped to
(promotion_effect_id).
ApprovalMismatch
A token was presented, but it approves a different effect id.
Trait Implementations§
Source§impl Clone for PromotionRefusal
impl Clone for PromotionRefusal
Source§fn clone(&self) -> PromotionRefusal
fn clone(&self) -> PromotionRefusal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PromotionRefusal
impl Debug for PromotionRefusal
Source§impl Display for PromotionRefusal
impl Display for PromotionRefusal
Source§impl Error for PromotionRefusal
impl Error for PromotionRefusal
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()