Measured
Fixture: app/utils/dead.py. Nothing in the repository imports this module. Its only internal call is OrphanClass.method calling never_called, and method itself has zero callers — the whole file is unreachable.
At engine v3.0.0:
never_called rank #697 of 22,330 centrality 96.8%
For reference this was rank #15 / 86.6% before v3.0.0, so the rank improved while the score got worse.
Why it matters
Centrality currently measures local in-degree without reference to reachability from any entry point. Dead code with one dead caller therefore looks as important as a genuine hub, and PR #2 on the fixture (a change to dead.py, true blast radius 0) reported an entry point reached.
Suggested fix
Weight centrality by reachability from graph roots, or exclude components with no path from any entry point. Related to #175 — both are cases where local edge structure is scored without regard to whether anything can actually get there.
Reproduce
analyze-local /path/to/arbor-torture --top 25000 > out.txt
python grade.py out.txt # check G
Measured
Fixture:
app/utils/dead.py. Nothing in the repository imports this module. Its only internal call isOrphanClass.methodcallingnever_called, andmethoditself has zero callers — the whole file is unreachable.At engine v3.0.0:
For reference this was rank #15 / 86.6% before v3.0.0, so the rank improved while the score got worse.
Why it matters
Centrality currently measures local in-degree without reference to reachability from any entry point. Dead code with one dead caller therefore looks as important as a genuine hub, and PR #2 on the fixture (a change to
dead.py, true blast radius 0) reported an entry point reached.Suggested fix
Weight centrality by reachability from graph roots, or exclude components with no path from any entry point. Related to #175 — both are cases where local edge structure is scored without regard to whether anything can actually get there.
Reproduce