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
Two correctness fixes surfaced by a bug-hunt pass over the codebase, plus two
defensive guards for currently-unreachable panics.
Fixes:
- pythonextractor: resolveCall no longer fabricates same-module RelCalls edges
for callable parameters, locals, and loop variables. It now mirrors
valueRefTarget — skipping parameter names and resolving only known module-level
defs (via idx.moduleDefs) when an index is present, with a best-effort fallback
for the index-less single-file path. Removes spurious "used" signals, inflated
fan-out, and misleading impact analysis.
- explainers/common: BuildModuleGraph no longer pre-filters imports through
IsExternalImport, which misclassified single-segment internal modules
(e.g. top-level "cmd", "config") as external and dropped real edges. The
authoritative moduleNames gate now decides inclusion; IsExternalImport is left
unchanged so Go stdlib / npm classification is preserved.
Hardening (defensive; not currently reachable):
- pythonextractor: popOwner/popType are now no-ops on empty stacks instead of
panicking on a slice-bounds underflow.
- server: bestPath returns a clean not-found PathResult for empty candidate
slices instead of indexing fromCands[0]/toCands[0] out of range.
All changes covered by unit tests. Also initializes moduleDefs in the
astExtractWithIndex test helper so it mirrors the production index.
0 commit comments