pub enum ContractKind {
Kernel,
Registry,
ModelFamily,
ModelFamilyVariant,
Tokenizer,
TrainingLoop,
PretrainingCorpus,
TrainingPreconditionGate,
CorpusAssembly,
Pattern,
Schema,
}Expand description
The kind of contract artifact. Determines which validation rules apply.
Kernel(default): a mathematical kernel contract — the provability invariant applies (must haveproof_obligations,falsification_tests,kani_harnesses).Registry: a data registry (lookup tables, enum definitions, config bounds) — exempt from provability, validated formetadata+ entries.ModelFamily: architecture metadata (HuggingFacefamily descriptors, size variants, vendor) — exempt from provability, validated formetadatafields. Custom top-level fields are preserved but not enforced by the kernel schema.ModelFamilyVariant: a concrete size variant of a model family (e.g. Llama 370M sovereign). Freezes hyperparameters (vocab, hidden dim, layer count) and delta-dispatches invariants from the parent family. Exempt from provability.Tokenizer: a concrete tokenizer contract — vocab bounds, required special tokens, round-trip gate, normalization form. Exempt from provability (gates are byte-exact tests, not Kani harnesses).TrainingLoop: a training-loop contract — loss schedule, optimizer config, gradient-clipping policy, checkpoint cadence. Exempt from provability; validated formetadata+ schedule fields.PretrainingCorpus: a pretraining-corpus contract — dataset source, license, total-bytes bound, shard layout. Exempt from provability.TrainingPreconditionGate: a hard precondition gate that must be satisfied before training starts (e.g. Chinchilla compute-optimal token/parameter ratio, GPU memory floor, dataset checksum). Exempt from provability; validated formetadata+ gate-formula fields.CorpusAssembly: a multi-source corpus assembly pipeline contract — declares input shards, dedup strategy, license-merge policy, and output manifest. Exempt from provability.Pattern: a cross-cutting verification pattern (threading safety, async safety, compute parity) that applies across multiple kernels. Exempt from the kernel provability invariant but still validated for metadata and any proof/falsification data present.Schema: a generic reference/schema document — exempt from provability, validated only formetadata.id,metadata.version,metadata.description, andmetadata.references.
Variants§
Kernel
Registry
ModelFamily
ModelFamilyVariant
Tokenizer
TrainingLoop
PretrainingCorpus
TrainingPreconditionGate
CorpusAssembly
Pattern
Schema
Trait Implementations§
Source§impl Clone for ContractKind
impl Clone for ContractKind
Source§fn clone(&self) -> ContractKind
fn clone(&self) -> ContractKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContractKind
impl Debug for ContractKind
Source§impl Default for ContractKind
impl Default for ContractKind
Source§fn default() -> ContractKind
fn default() -> ContractKind
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ContractKind
impl<'de> Deserialize<'de> for ContractKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 Display for ContractKind
impl Display for ContractKind
Source§impl Hash for ContractKind
impl Hash for ContractKind
Source§impl Ord for ContractKind
impl Ord for ContractKind
Source§fn cmp(&self, other: &ContractKind) -> Ordering
fn cmp(&self, other: &ContractKind) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ContractKind
impl PartialEq for ContractKind
Source§fn eq(&self, other: &ContractKind) -> bool
fn eq(&self, other: &ContractKind) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ContractKind
impl PartialOrd for ContractKind
Source§impl Serialize for ContractKind
impl Serialize for ContractKind
impl Copy for ContractKind
impl Eq for ContractKind
impl StructuralPartialEq for ContractKind
Auto Trait Implementations§
impl Freeze for ContractKind
impl RefUnwindSafe for ContractKind
impl Send for ContractKind
impl Sync for ContractKind
impl Unpin for ContractKind
impl UnsafeUnpin for ContractKind
impl UnwindSafe for ContractKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.