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
impl KaizenRecord
Sourcepub fn delta_pair(&self) -> Option<(&Mapping, &Mapping)>
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
impl Clone for KaizenRecord
Source§fn clone(&self) -> KaizenRecord
fn clone(&self) -> KaizenRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more