Skip to main content

Module cycle_health

Module cycle_health 

Expand description

cycle-health analysis — per-cycle behavioral heat, live/fossil verdict, and the cheapest cut point for each import tangle.

dependency-cycles lists the members of every non-trivial SCC of the structural import graph; this analysis ranks those tangles by how much they matter right now and says where to start dismantling them. It is the structure×history fusion of Kazman & Cai’s hotspot lineage (Mo, Cai, Kazman, Xiao 2015 Hotspot Patterns) applied to the cyclic groups of the “hidden structure” view (Baldwin, MacCormack & Rusnak 2014):

  • heat_pct — the cycle members’ share of repo LOC churn (loc_added + loc_deleted) over the trailing --window-days window, anchored to the repo’s last commit date (reproducible on archived repos), over the lineage-aware changes source. A tangle nobody touches costs little; a hot one taxes every change.
  • verdictlive when at least one member appears in a window commit (a zero-LOC touch still counts), fossil otherwise.
  • extract_candidate — the member whose trial removal best dismantles the tangle: smallest largest-surviving-SCC, then fewest surviving cyclic nodes, then lexicographically smallest path.
  • predicted_pc_drop — the whole-graph propagation-cost drop (MacCormack, Rusnak & Baldwin 2006) if the candidate node were extracted (every edge touching it removed). The trial-removal search and this prediction run only for tangles of ≤ 64 members; above the bound the value is absent (honest absence, not an estimate) and the candidate falls back to the member with the highest in-cycle degree.

Accuracy follows the import resolver’s language coverage, same caveat as dependency-cycles.

Structs§

CycleHealthRow
One import cycle’s health. One row per non-trivial SCC.

Functions§

run_cycle_health
Run the cycle-health analysis. Returns one row per non-trivial SCC of the resolved import graph, sorted by heat_pct descending, then size descending, then cycle_id ascending — the live big tangles first.