pub struct ConfigLock {
pub lock_version: u32,
pub supercode_version: String,
pub preset_chain: Vec<String>,
pub config: HarnessConfig,
}Expand description
BP-9 (D6 row “Config reproducibility lockfile”, cx§6
[debug.config_lockfile]): a resolved-config SNAPSHOT pinned to the
build that produced it. Written by supercode config lock, verified by
supercode config check --lock.
The snapshot is the FOLDED HarnessConfig (every layer already
merged, sanitized and clamped) plus the extends chain it came from and
the supercode version that resolved it — the three things that have to
match for a rerun to mean the same thing. It is deliberately NOT the
materialized Config: that type carries boxed callbacks, isn’t
serializable, and would make the lockfile a snapshot of the CODE rather
than of the CONFIG.
Fields§
§lock_version: u32Lockfile format version; 1 is the only one this build writes.
supercode_version: StringThe supercode version whose resolver produced config.
preset_chain: Vec<String>The resolved extends chain, root-first.
config: HarnessConfigThe fully-folded config.
Implementations§
Source§impl ConfigLock
impl ConfigLock
Sourcepub fn from_resolved(resolved: &Resolved, supercode_version: &str) -> Self
pub fn from_resolved(resolved: &Resolved, supercode_version: &str) -> Self
Snapshot a Resolved.
Sourcepub fn to_json(&self) -> String
pub fn to_json(&self) -> String
Render as pretty JSON (the on-disk form: one canonical serializer,
diffable in review, and a superset of what TOML can express — a
[capabilities.*] settings blob is untyped JSON already).
Sourcepub fn drift(&self, resolved: &Resolved, supercode_version: &str) -> Vec<String>
pub fn drift(&self, resolved: &Resolved, supercode_version: &str) -> Vec<String>
BP-9: what changed between this lock and a fresh resolve — one line per drifting dotted key, plus the version/chain lines. EMPTY means the environment reproduces the lock exactly.
The version is compared because a resolver change can silently alter what the SAME config text means; the chain because a preset swapped underneath is drift even when the folded result happens to look similar.
Trait Implementations§
Source§impl Clone for ConfigLock
impl Clone for ConfigLock
Source§fn clone(&self) -> ConfigLock
fn clone(&self) -> ConfigLock
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more