pub fn collect_reachable_node_ids<K>(
start_node_id: &str,
adjacency: &BTreeMap<K, BTreeSet<String>>,
) -> Vec<String>Expand description
The single shared reachability BFS loop for the cross-file engine: forward closure over a
deterministic BTreeMap adjacency, returned sorted (BTreeSet order). Generic over the
adjacency key type so each caller keeps its OWN adjacency builder (the distinct node spaces
comment-2 point 4 demands) while sharing exactly one traversal loop. (The substrate diagnostics
reachability is a separate borrowed-&str DFS over inline-filtered resolved edges and is
intentionally NOT one of the two BFS impls this collapses.)