Measured
Fixture files: hard/reexport_base.py, hard/reexport_mid.py, hard/reexport_leaf.py, hard/aliased.py, hard/conditional.py.
original_function is defined once in reexport_base.py and reached four ways:
reexport_leaf.py imports it from reexport_mid.py (two hops)
aliased.py — from hard.reexport_base import original_function as renamed
aliased.py — import hard.reexport_base as base_mod, then base_mod.original_function(n)
conditional.py — imported inside a try/except ImportError
At engine v3.0.0:
original_function 1 caller (truth: 4)
Why it matters
Re-export barrels (__init__.py, index.ts) and aliased imports are standard in Python and near-universal in TypeScript. Every edge through one is currently lost, which under-reports blast radius on exactly the packages most likely to be widely depended on.
Suggested fix
Follow an import whose target is itself an import (bounded, with cycle detection). Confirm the parser records the local name for as aliases — from x import y as z must key on z.
Reproduce
analyze-local /path/to/arbor-torture --top 25000 > out.txt
python grade.py out.txt # check D
Measured
Fixture files:
hard/reexport_base.py,hard/reexport_mid.py,hard/reexport_leaf.py,hard/aliased.py,hard/conditional.py.original_functionis defined once inreexport_base.pyand reached four ways:reexport_leaf.pyimports it fromreexport_mid.py(two hops)aliased.py—from hard.reexport_base import original_function as renamedaliased.py—import hard.reexport_base as base_mod, thenbase_mod.original_function(n)conditional.py— imported inside atry/except ImportErrorAt engine v3.0.0:
Why it matters
Re-export barrels (
__init__.py,index.ts) and aliased imports are standard in Python and near-universal in TypeScript. Every edge through one is currently lost, which under-reports blast radius on exactly the packages most likely to be widely depended on.Suggested fix
Follow an import whose target is itself an import (bounded, with cycle detection). Confirm the parser records the local name for
asaliases —from x import y as zmust key onz.Reproduce