pub struct PartsLibraryEntry {
pub source_key: String,
pub source_signature: String,
pub document: Value,
pub snapshot: String,
pub snapshot_producer: String,
pub ports: BTreeMap<String, PortRecord>,
pub dirty: bool,
pub doc_hash: u64,
}Expand description
One unique part payload (spec §2.1). dirty is RESIDENT-ONLY state: set by
refresh_library_entry (edit-in-context / update-components) when the
new document builds differently, it forces the ACOMP self-heal lane on the
next run even with a readable snapshot, and clears when the heal rewrites
the snapshot.
Fields§
§source_key: String§source_signature: String§document: ValueThe embedded full sub-part history JSON — the durable source the self-heal lane re-executes when the snapshot cache fails.
snapshot: StringThe evaluated part as an io/snapshot payload (the fast lane).
snapshot_producer: StringThe kernel build that produced snapshot ([kernel_source_stamp]).
A snapshot is a CACHE of evaluated geometry, and it is only as current as
the code that evaluated it. Before this stamp an entry was served for as
long as it decoded, so a document kept the geometry of whichever kernel
first inserted the part, whatever the kernel had learned since: the
AssemblyTest fixture decoded 1859.122725 where a rebuild of its own
document gives 1859.151146, and the stale body failed the shell
vector-area bar at 4.7x. An entry whose stamp differs from the running
build — including one with no stamp — is rebuilt by the ACOMP lane.
Carried beside the snapshot rather than inside the BREPSNAP container,
whose layout is a durable format (see io/snapshot.rs).
ports: BTreeMap<String, PortRecord>The part’s harness ports (part-local id -> record, part-local pose), captured from the same run as the snapshot. Derived like the snapshot: an entry whose document declares a PORT but carries none is healed.
dirty: bool§doc_hash: u64Stable content hash of document, precomputed at insert/refresh/ingest
so the per-feature cache hook never re-hashes a large document.