Skip to main content

ApplyVerdict

Enum ApplyVerdict 

Source
pub enum ApplyVerdict {
    Apply {
        winner_composite: f64,
        incumbent_mean: f64,
        margin: f64,
        drift: f64,
        paired: Option<PairedEffect>,
    },
    IncumbentStands {
        incumbent_mean: f64,
    },
    WithinDrift {
        margin: f64,
        drift: f64,
    },
    PairedDisagrees {
        wins: usize,
        losses: usize,
    },
    Uncalibrated,
    Contaminated {
        unmeasured_runs: usize,
    },
}
Expand description

What an apply attempt decided, and the numbers it decided on.

Refusals are first-class outcomes, not errors: each names the evidence that was missing or contrary, because “the gate said no” is only useful if it says what would have changed the answer.

Variants§

§

Apply

The winner cleared every gate and may be stored as this model’s measured defaults.

Fields

§winner_composite: f64

The winning candidate’s composite.

§incumbent_mean: f64

Mean composite of the incumbent pair.

§margin: f64

winner_composite − incumbent_mean.

§drift: f64

The calibration pair’s gap — the run’s own drift.

§paired: Option<PairedEffect>

The winner-versus-incumbent paired comparison.

§

IncumbentStands

The best candidate is the incumbent: the model’s current defaults beat every swept candidate, and there is nothing to apply. Not a failure — the run answered its question.

Fields

§incumbent_mean: f64

The incumbent pair’s mean composite.

§

WithinDrift

The winner’s margin over the incumbent is inside the run’s own drift. Unresolved, not absent — the fix is more tasks or a re-run, never a smaller threshold.

Fields

§margin: f64

winner_composite − incumbent_mean.

§drift: f64

The calibration pair’s gap.

§

PairedDisagrees

The margin clears the drift, but the per-task paired comparison runs the other way — the winner’s mean rests on a minority of tasks. A mean and its pairs disagreeing is exactly the shape a lucky outlier task produces.

Fields

§wins: usize

Pairs the winner took.

§losses: usize

Pairs the incumbent took.

§

Uncalibrated

The run carries no incumbent pair, so nothing calibrates it — a run from before the calibration pair existed, or one whose incumbents never completed. Nothing can be applied from it.

§

Contaminated

The winner or an incumbent has runs that never reached the model, so their composites are contaminated by a knowable amount and the comparison is not trustworthy.

Fields

§unmeasured_runs: usize

Unmeasured runs across the compared candidates.

Implementations§

Source§

impl ApplyVerdict

Source

pub const fn applies(&self) -> bool

Whether this verdict licenses writing the winner.

Source

pub const fn rationale(&self) -> &'static str

Why the gate decided this, in one sentence.

Split from Display because the two surfaces want different amounts: a table column wants the numbers, a detail view wants the numbers and the reasoning. Keeping them apart lets both read from one source instead of each restating the gate’s rules in its own words — which is how three renderers came to disagree about what a refusal meant.

Every sentence here says what would resolve the refusal, because a gate that only says “no” teaches nobody anything.

Trait Implementations§

Source§

impl Clone for ApplyVerdict

Source§

fn clone(&self) -> ApplyVerdict

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ApplyVerdict

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ApplyVerdict

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for ApplyVerdict

The verdict’s headline: what happened, with the numbers that decided it.

Deliberately unstyled and single-line so every surface can wrap it in its own presentation. Pair with ApplyVerdict::rationale where there is room to explain.

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ApplyVerdict

Source§

fn eq(&self, other: &ApplyVerdict) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for ApplyVerdict

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for ApplyVerdict

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,