Skip to main content

KaizenRecord

Struct KaizenRecord 

Source
pub struct KaizenRecord {
    pub contract: Option<String>,
    pub title: Option<String>,
    pub kaizen: Option<Value>,
    pub parent: Option<String>,
    pub status: Option<String>,
    pub date: Option<Value>,
    pub baseline: Option<Value>,
    pub target: Option<Value>,
    pub invariants: Option<Value>,
}
Expand description

The kaizen-specific top-level blocks of a record, read in a second parse pass by crate::schema::parse_contract_str.

Every field is optional and typed as loosely as the corpus demands (kaizen: is a string in 38 records and a bare integer in 8; date: is a YAML date in 16 and a quoted string in 1). Loose types here are not laxness — they are what lets the VALIDATOR name the problem instead of serde killing the parse with an opaque type error, the same reasoning that makes crate::schema::Metadata::demand_score an i64.

This is a #[serde(skip)] field of crate::schema::Contract rather than nine new top-level Contract fields on purpose: status, version, invariants and files are all keys OTHER contracts in the corpus carry with incompatible shapes, and widening Contract to admit them would change how 1726 files parse in order to validate 46.

Fields§

§contract: Option<String>

The record’s own identifier (contract:), e.g. C-BWDSTG-001.

§title: Option<String>

One-line statement of the improvement.

§kaizen: Option<Value>

The kaizen ticket this record discharges (KAIZEN-061, 045, 203).

§parent: Option<String>

The contract this record improves upon, if any.

§status: Option<String>

Lifecycle state; checked against KAIZEN_STATUSES.

§date: Option<Value>

When the improvement was recorded.

§baseline: Option<Value>

Measured state BEFORE the change. Either a flat metric map, or a map carrying its own before:/after: pair (gpu-l2-norm-reduction-v1).

§target: Option<Value>

Measured state AFTER the change.

§invariants: Option<Value>

Free-form invariants the record asserts survive the change.

Implementations§

Source§

impl KaizenRecord

Source

pub fn delta_pair(&self) -> Option<(&Mapping, &Mapping)>

The (before, after) metric maps this record pins, if it pins any.

Two shapes are accepted because both exist in the corpus: baseline:/target: (16 records) and a baseline: that carries its own before:/after: (1 record). Returning None means the record makes no numeric claim at all — legitimate for the 29 records that assert invariants: instead, and handled by KAIZEN-003.

Trait Implementations§

Source§

impl Clone for KaizenRecord

Source§

fn clone(&self) -> KaizenRecord

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 KaizenRecord

Source§

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

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

impl Default for KaizenRecord

Source§

fn default() -> KaizenRecord

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for KaizenRecord

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 Serialize for KaizenRecord

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

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.