pub fn detect_cycle(index: &Index, from_id: &str, to_id: &str) -> Result<bool>Expand description
Detect a cycle in the dependency graph.
Uses DFS from to_id to check if from_id is reachable.
If so, adding the edge from_id -> to_id would create a cycle.