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
Native graph engine: closeness at every size + directed average path length #3037
core-engineModifications to the central physics and parsing engineenhancementNew feature, sensor, or structural signaturemetricsHeuristics, risk exposures, and topological math updatesperformance
Closeness on the reversed index with Wasserman-Faust; average path length over the largest undirected component.
Replace the V>1500 (closeness) and V>5000 (avg path length) node-count cutoffs with a work budget on V×E. The crucible graph (2,817 nodes) computes exact closeness in 21 ms with networkx, yet is skipped today.
Parallel per-source BFS above a size threshold, with results combined in fixed order.
Acceptance criteria
Parity with networkx wherever networkx computes the value
Average path length beats 1,213 ms on the crucible graph
Note: raising the cutoff CHANGES full-precision output (closeness starts being computed on large repos). That needs a scoped bless and a PR note.
Relevant baseline
operation
networkx
notes
closeness (exact, all nodes)
21.4 ms
the 1,500-node cutoff is far too conservative for sparse import graphs
avg shortest path length (LCC)
1,213.5 ms
the dominant cost of the whole graph phase
Networkx conventions to match
closeness (directed): computed on G.reverse(), i.e. incoming distance
Revised by the tailoring decisions on #3033 (2026-09-14).
Closeness: remove the V>1500 cutoff; compute it at every size, gated only by the deterministic work budget from Native graph engine: shared CSR graph index + parity/benchmark harness #3034. Exact all-node closeness takes 18 ms on crucible (V=2,817), which is skipped today. Oracle: nx.closeness_centrality(G) with no cutoff.
Average path length: REDEFINED as the mean hop count over all directed reachable pairs (A transitively depends on B), across every file, instead of the largest undirected component. Measured:
crucible: 1.36 over 1,891 pairs in 6 ms, vs 7.05 undirected-LCC in 952 ms covering 22.5% of files
self-scan: 1.71 vs 4.19
Oracle: mean of nx.single_source_shortest_path_length(G, n) over all n, excluding self. Store it in repo_data.network_avg_path_length (the same column), and document the new meaning in the LLM brief §3.5 interpretation text and in docs/zero_dependency_mode.md.
Acceptance:
parity with the tailored oracles
a scoped golden-master diff in both modes: closeness appears on large repos; path length changes value
the PR notes the definition change for temporal-crucible history
changed the title [-]Native graph engine: closeness and average path length (BFS family) with parallel sources and an edge-budget cutoff[/-][+]Native graph engine: closeness at every size + directed average path length[/+]on Sep 14, 2026
core-engineModifications to the central physics and parsing engineenhancementNew feature, sensor, or structural signaturemetricsHeuristics, risk exposures, and topological math updatesperformance
Activity
squid-protocol commentedon Sep 14, 2026
Revised by the tailoring decisions on #3033 (2026-09-14).
Closeness: remove the V>1500 cutoff; compute it at every size, gated only by the deterministic work budget from Native graph engine: shared CSR graph index + parity/benchmark harness #3034. Exact all-node closeness takes 18 ms on crucible (V=2,817), which is skipped today. Oracle:
nx.closeness_centrality(G)with no cutoff.Average path length: REDEFINED as the mean hop count over all directed reachable pairs (A transitively depends on B), across every file, instead of the largest undirected component. Measured:
Oracle: mean of
nx.single_source_shortest_path_length(G, n)over all n, excluding self. Store it inrepo_data.network_avg_path_length(the same column), and document the new meaning in the LLM brief §3.5 interpretation text and indocs/zero_dependency_mode.md.Acceptance:
[-]Native graph engine: closeness and average path length (BFS family) with parallel sources and an edge-budget cutoff[/-][+]Native graph engine: closeness at every size + directed average path length[/+]Native graph engine: cyclic density (SCC) + articulation points in O(…
squid-protocol commentedon Sep 14, 2026
Landed on main in 492b029, via #3046's squash merge (#3046 was stacked on #3044):
PR #3044 is closed as superseded.