You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
impact --depth N misses dependents within N hops (depth-limited DFS marks nodes visited at the limit) #1974
codegraph impact t --depth 2 → t, a, b (expected t, a, b, c: c → b → t is 2 hops)
codegraph impact t --depth 3 → t, a, b, c
Cause:getImpactRecursive (src/graph/traversal.ts:543-600) and getCallersRecursive (:270-317) are depth-limited DFS walks with one shared visited set. Here b is first reached through a at depth 2, the limit, so it's marked visited without being expanded. When it's reached again directly from t at depth 1, it's skipped, so c is never found. Which dependents go missing depends on edge order.
The viewer's blast radius uses the same call (src/ui-server/api/node.ts:462, stats.ts:71, depth 3), so it undercounts the same way.
Suggested fix: walk level by level, as traverseBFS in the same file does, or re-expand a node when it's reached at a smaller depth than before. #1089 fixed a related gate in the same function (dropped edges), but not this. The open changes in #1583 / #1352 keep the recursive DFS, so they don't cover it either.
Thanks for the detailed report, @inth3shadows, and thanks for using CodeGraph! This is fixed on main by #2000, which builds on @danusha2345's #1991 (thank you!): impact --depth N (and callers/callees at a depth) now finds every dependent within N hops, even when a longer path reaches one of them first. The fix will be in the next release.
Activity
fix(graph): don't lose dependents within the depth limit to edge order (
Merge codex/integration-all-2026-09-26 (colbymchenry#1974)
fix(graph): don't lose dependents within the depth limit to edge order (
colbymchenry commentedon Sep 27, 2026
Thanks for the detailed report, @inth3shadows, and thanks for using CodeGraph! This is fixed on
mainby #2000, which builds on @danusha2345's #1991 (thank you!):impact --depth N(and callers/callees at a depth) now finds every dependent within N hops, even when a longer path reaches one of them first. The fix will be in the next release.