From e73ca4e4a7de5c958fd387215cdb36e62909cfdb Mon Sep 17 00:00:00 2001 From: nothariharan Date: Fri, 23 Oct 2026 16:14:23 +0530 Subject: [PATCH] fix(extract): don't promote module-imported same-named calls to EXTRACTED (#2945) When an ambiguous bare call resolves to a candidate solely because the caller imported the candidate's source module (not the symbol itself), the edge was promoted to EXTRACTED, falsely certifying a same-named symbol that was never actually imported. Keep the resolution (for graph connectivity) but mark it INFERRED. Symbol-level (from X import Y) imports still promote to EXTRACTED. --- graphify/extract.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/graphify/extract.py b/graphify/extract.py index cb4d9bdba..c087dc91d 100644 --- a/graphify/extract.py +++ b/graphify/extract.py @@ -10714,7 +10714,11 @@ def extract( ] if len(module_matches) == 1: tgt = module_matches[0] - has_import_evidence = True + # Module-level import evidence only proves the caller pulled in + # the callee's source file, not that it imported this specific + # symbol. Promoting to EXTRACTED here falsely certifies a + # same-named symbol that was never actually imported (#2945). + has_import_evidence = False else: # No unique import evidence. Instead of dropping the edge # outright (which let a single same-named test mock erase the