Skip to main content

PairReplayRecord

Struct PairReplayRecord 

Source
pub struct PairReplayRecord {
Show 13 fields pub schema_version: u32, pub selection_hash: String, pub root_seed: u64, pub strategy: String, pub strategy_version: u32, pub singleton_policy: String, pub singleton_policy_version: u32, pub degenerate_policy_version: u32, pub budget: u64, pub default_was_clamped: bool, pub emitted_kinds: String, pub affected_singleton_classes: u64, pub deviation: [String; 3],
}
Expand description

The ~200-byte record a pair stream regenerates from.

§Pairs are replayed, not stored (D-09)

Forty benchmark cells times ten seeds times many epochs of pair bytes is gigabytes of derivable data. Only this record and the manifest hash are persisted; a serverless consumer carries the record instead of a file. An explicit DUMP path (dump_pairs) exists for audit and fixture generation, and it is the only thing that ever writes pair bytes.

Every field is present even when it holds its default, because an absent field is indistinguishable from a field that was never considered.

Fields§

§schema_version: u32

Record schema version.

§selection_hash: String

Hex semantic_hash of the selection the pairs are drawn over.

§root_seed: u64

The root seed every draw key derives from.

§strategy: String

Wire name of the sampling strategy.

§strategy_version: u32

Version tag of that strategy. A change here changes pair IDENTITIES.

§singleton_policy: String

Wire name of the singleton policy.

§singleton_policy_version: u32

Version tag of that policy.

§degenerate_policy_version: u32

Version tag of the degenerate-layout policy.

§budget: u64

The RESOLVED effective budget — post-clamp, exactly what the stream emitted.

The hard cap itself is deliberately NOT persisted: the resolved budget subsumes it for replay, and the record stays small (D-09).

§default_was_clamped: bool

Whether the DEFAULT budget was clamped. A clamped run that looked unclamped in the artifact would defeat the point of recording it.

§emitted_kinds: String

both, positives_only or negatives_only.

§affected_singleton_classes: u64

How many classes held exactly one selected example (OBLIG-CPP-SINGLETON-EXPLICIT).

§deviation: [String; 3]

The three declared deviation clauses, verbatim.

Implementations§

Source§

impl PairReplayRecord

Source

pub fn from_sampler(sampler: &PairSampler<'_>) -> Self

Describe a live sampler.

§Why this takes ONLY the sampler

The plan’s interface sketch was from_sampler(sampler, selection, cfg). A sampler already BORROWS its selection and already retains its resolved configuration, so the extra parameters could only ever disagree with it — and a replay record that describes a different selection or a different budget than the stream it attests is precisely the artifact this record exists to make impossible. One argument, one source of truth.

Source

pub fn to_canonical_bytes(&self) -> Result<Vec<u8>, ContrastiveDataError>

Deterministic canonical serialization — the bytes the manifest hash commits FIRST.

§Errors

ContrastiveDataError::Serialization if the record cannot be serialized.

Source

pub fn to_config(&self) -> Result<PairConfig, ContrastiveDataError>

Trait Implementations§

Source§

impl Clone for PairReplayRecord

Source§

fn clone(&self) -> Self

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 PairReplayRecord

Source§

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

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

impl<'de> Deserialize<'de> for PairReplayRecord

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 PairReplayRecord

Source§

impl PartialEq for PairReplayRecord

Source§

fn eq(&self, other: &Self) -> 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 PairReplayRecord

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 PairReplayRecord

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.