computePathsToRoot
Computes shortest paths from all nodes to the graph root using Dijkstra's algorithm.
Uses the eager graph (construction-time dependencies only) for consistent analysis with other DAG-based algorithms and to avoid potential issues with cycles from deferred dependencies.
Paths are stored as lists from each node to the root (inclusive).