Skip to main content

Baseline

Struct Baseline 

Source
pub struct Baseline {
    pub ref: String,
    pub commit_oid: String,
    pub toolchain: String,
    pub test_passlist_hash: String,
    pub clippy_warnings_hash: String,
    pub enumerated_targets_hash: String,
    pub extra: Map<String, Value>,
}
Expand description

Baseline snapshot captured at the feat/<slug> fork (owner: supervisor).

§Provenance fields (floor-capture-hardening-round-2 item 5 / F10)

r#ref is a mutable ref string (feat/<slug>@fork) — a force-push can re-point it. The floor therefore also records the pinned commit_oid the ref resolved to at capture time, the toolchain fingerprint the snapshot was captured with, and enumerated_targets_hash (F7). The evaluator compares all of these — not just the two content hashes — so a spec-node cannot smuggle a baseline captured at a different commit, under a different toolchain, or over a narrowed target set than the one the supervisor gates against.

As of schema v3 (PROVENANCE_REQUIRED_SCHEMA) all three are required: they carry no #[serde(default)], so a document missing one fails to deserialize (PlanValidationError::Malformed), and validate_plan additionally rejects an empty / whitespace-only value (PlanValidationError::EmptyString) — the same two-layer treatment the other required baseline strings (ref, the two content hashes) get. This is the structural half of the fail-closed provenance guard; the evaluator (verify_plan_baseline) is the runtime half that additionally checks the values match the live snapshot. A security oracle treats “no evidence” as a rejection, not a match — so the plan may not even omit the evidence.

Fields§

§ref: String

Git ref the snapshot was taken at (e.g. feat/<slug>@fork) — mutable, display/audit only; commit_oid is the authoritative binding.

§commit_oid: String

The ref resolved to an immutable commit OID at capture time (provenance). Required as of v3.

§toolchain: String

rustc -V fingerprint the snapshot was captured with (provenance). Required as of v3.

§test_passlist_hash: String

Hash of the passing-test list at baseline (floor: no baseline pass may regress).

§clippy_warnings_hash: String

Hash of the clippy-warning list at baseline (floor: no new warnings).

§enumerated_targets_hash: String

Hash of the enumerated (package, target_kind, target) test-target set at baseline (floor F7: the tip’s set must be a superset — a shrink fails closed). Required as of v3.

§extra: Map<String, Value>

Unrecognized keys, captured for the compatibility check.

Trait Implementations§

Source§

impl Clone for Baseline

Source§

fn clone(&self) -> Baseline

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 Baseline

Source§

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

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

impl<'de> Deserialize<'de> for Baseline

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 Eq for Baseline

Source§

impl PartialEq for Baseline

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl Serialize for Baseline

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 Baseline

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Instrument for T

Source§

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

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

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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