pub fn install_parts_library(incoming: &PartsLibraryMap) -> boolExpand description
INSTALL a library wholesale — the app → history-runner channel (the runner owns its own thread-local store, and the per-run request no longer carries the block, so this is how a background thread/worker learns the library).
Unlike [ingest] (fill-only, resident-wins) this makes the store MATCH
incoming BY CONTENT IDENTITY, which is what a cache channel needs:
- a name missing from the store is inserted (stamped + hashed like ingest);
- a name whose resident entry has the SAME identity is KEPT VERBATIM — that
is what protects a runner-side heal, whose only trace is a rewritten
snapshot, from being clobbered by a re-send; - a name whose resident entry has a DIFFERENT identity but the SAME build
(
same_build: only the symbol, pads or BOM attributes moved) is REPLACED with the resident snapshot and ports carried over — they still describe the part, so nothing is rebuilt; - a name whose resident entry builds DIFFERENTLY is REPLACED and marked
dirty, so the ACOMP self-heal lane re-derives every instance (dirtyis#[serde(skip)]and cannot ride the wire — it is derived HERE, from the mismatch); - a resident name ABSENT from
incomingis dropped.
Returns whether anything changed (and bumps the revision if so).