Skip to content

Instantly share code, notes, and snippets.

@gok-r
gok-r / dep_graph_explorer_tiered.diff
Created April 29, 2026 10:01
dep_graph_explorer: tiered rdeps test counting (depth-3 from seed + depth-2 from parents + depth-1 from grandparents)
diff --git a/lab/bazel/dep_graph_explorer/core/graph_algorithms.py b/lab/bazel/dep_graph_explorer/core/graph_algorithms.py
index 8ae63c7c18ab..4b4623b4fc28 100644
--- a/lab/bazel/dep_graph_explorer/core/graph_algorithms.py
+++ b/lab/bazel/dep_graph_explorer/core/graph_algorithms.py
@@ -123,21 +123,31 @@ def full_rdeps_tests(
G_rev: nx.DiGraph,
rev_nodes: frozenset[str],
valid_tests: frozenset[str],
+ max_depth: int | None = None,
) -> set[str]: