pub fn would_create_cycle(
task_id: &str,
depends_on_id: &str,
existing_deps: &[TaskDependency],
) -> boolExpand description
Check whether adding (task_id → depends_on_id) would create a cycle.
Uses BFS upstream traversal: starting from depends_on_id, follow
all outgoing dependencies. If we reach task_id, there’s a cycle.
§Arguments
task_id— the task that would be blockeddepends_on_id— the task it would depend onexisting_deps— all current dependencies in the system
Returns true if adding this edge would create a cycle.