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 nested_constraints: Option<Vec<NestedConstraint>>,
pub nested_poses: BTreeMap<String, AffineTransform>,
pub nested_rows: Option<SavedRows>,
pub doc_hash: u64,
}Expand description
One unique part payload. 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§nested_constraints: Option<Vec<NestedConstraint>>The statuses of the part’s own assembly constraints and of every
sub-assembly below it, from the run that made snapshot (see
NestedConstraint). None means no run has happened in this session:
the rows are not saved, so an entry whose document carries constraints
is rebuilt once after a load (needs_constraint_rows) — the parent
must report how its sub-assembly’s mates ended, not assume they solved.
nested_poses: BTreeMap<String, AffineTransform>The solved occurrence poses of the same run, part-local frame (see
crate::feature_pipeline::ComponentRecord::nested_poses); kept and
cleared with nested_constraints.
nested_rows: Option<SavedRows>nested_constraints and nested_poses as SAVED beside the snapshot
(SavedRows): a loaded entry adopts them only under the snapshot’s
own rule, so reopening a saved assembly takes the snapshot lane instead
of rebuilding every sub-assembly with mates to learn its rows again.
doc_hash: u64Stable content hash of document, precomputed at insert/refresh/ingest
so the per-feature cache hook never re-hashes a large document.