pub fn detect_cycles(specs: &[LoadedSpec]) -> Vec<SpecError>Expand description
Detect cycles in the dependency graph using depth-first search.
Cycles are always errors regardless of ValidationOptions — a cycle causes infinite recursion during graph resolution.
NOTE: Cycle detection is in-tree only. Deps that reference units outside this
spec set (cross-library) are skipped during DFS — they are not in id_map.
The cross-library dep schema is locked in DECISIONS.md as namespace-prefixed
ids (for example shared::money/round), but cross-library cycle detection is
still deferred until M5 implements cross-library loading and validation.