fn heal_layout_body(
layout: &mut LayoutState,
valid_blocks: &HashSet<&str>,
) -> (bool, Vec<String>)Expand description
Pure heal pass on a LayoutState given the set of block IDs that should
still be present. Returns (changed, orphans_removed).
Collects orphans from both leaforder AND any leaf still reachable in
rootnode — leaforder can drift out of sync with rootnode if a
write was interrupted, and the heal is the last defense. Prunes each
orphan via prune_block_from_layout, then clears focusednodeid if
the rootnode ended up empty.