Skip to main content

ElasticConfig

Struct ElasticConfig 

Source
pub struct ElasticConfig {
    pub expensive_gates: Vec<String>,
    pub lambda: f64,
    pub alpha: Option<f64>,
    pub delta: Option<f64>,
    pub calibration_id: Option<String>,
}
Expand description

Elastic-verification serving config (ADR 0008 Phase 3). When present, the gates named in expensive_gates are treated as skippable: a rung serves without running them when the visible (cheap, always-run) gate score is >= lambda — the elastic three-regime rule, validated offline (firstpass-bench --elastic, artifact docs/benchmarks/elastic-validation.txt).

The load-bearing invariant (ADR 0008): the un-verified serves carry the same distribution-free served-failure bound as the verified ones only when lambda was conformally calibrated on representative data and the workload has not drifted. lambda is therefore operator-supplied from a calibration run — obtain it from firstpass calibrate / the offline --elastic harness, never hand-tuned. alpha/delta/calibration_id are recorded verbatim on every skip receipt so an auditor can check the bound held against realized deferred outcomes.

Default-off: absent config = today’s uniform cascade, byte-identical. Applies to the serial engine only; if speculation > 0 is also configured the expensive gates still run (conservative — running more gates never weakens the bound).

Fields§

§expensive_gates: Vec<String>

Gate ids that may be skipped when the visible signal clears lambda. Ids not listed here are “visible” (cheap, e.g. non-empty/json-valid/schema) and always run — they are the probe signal. Must be non-empty; validated by Config::parse.

§lambda: f64

Calibrated skip threshold λ: serve without the expensive gates iff the visible gate score is >= lambda. Must be finite and in [0, 1]; validated by Config::parse.

§alpha: Option<f64>

Target served-failure rate α the λ was calibrated at. Recorded on every skip receipt for audit; not enforced per-request (the calibration already baked it into λ).

§delta: Option<f64>

Confidence level (1−δ) the λ was calibrated at. Recorded on every skip receipt for audit.

§calibration_id: Option<String>

Provenance id of the calibration run that produced λ. Recorded on every skip receipt so the skip traces back to the exact conformal calibration that authorized it.

Trait Implementations§

Source§

impl Clone for ElasticConfig

Source§

fn clone(&self) -> ElasticConfig

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 ElasticConfig

Source§

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

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

impl<'de> Deserialize<'de> for ElasticConfig

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 PartialEq for ElasticConfig

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ElasticConfig

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.