Bisected to #979 (merge a6207c6, the #875 aliased direct-symbol import fix). The new direct-hit early return in resolve_import_map fires before suffix handling, so any imported_symbol.method() call whose base symbol is itself an indexed node resolves to the base node instead of base.method — the exact mis-resolution the comment above the insertion warns about.
Measured on django (identical checkout, full mode): CALLS 74,685 → 72,175 (−2,510), TESTS 38,032 → 29,236 (−8,796; test linkage consumes the same resolution path). Concrete example: auth.login ⇒ Signal.send degraded to auth.login ⇒ signals.user_logged_in (the Variable node, .send swallowed). ~9.6K true edges lost, ~7.1K degraded edges gained.
Fix (ready locally, reproduce-first): take the direct hit only when the callee has no suffix — which is precisely #979's intended case (from m import f as g; g()). With the fix: django CALLS 74,708 (= old + 23 genuine #979 wins), TESTS 38,035; #979's own resolve_import_map_bare_alias test stays green; new guard resolve_import_map_alias_with_suffix_hits_method is RED on current main and GREEN with the fix (registry suite 56/56).
Not in any release — v0.9.0 predates #979; needs to land before 0.9.1. Thanks @LA-10 for #979 itself — the feature is kept intact, only the early-return gets the suffix guard.
Bisected to #979 (merge a6207c6, the #875 aliased direct-symbol import fix). The new direct-hit early return in
resolve_import_mapfires before suffix handling, so anyimported_symbol.method()call whose base symbol is itself an indexed node resolves to the base node instead ofbase.method— the exact mis-resolution the comment above the insertion warns about.Measured on django (identical checkout, full mode): CALLS 74,685 → 72,175 (−2,510), TESTS 38,032 → 29,236 (−8,796; test linkage consumes the same resolution path). Concrete example:
auth.login ⇒ Signal.senddegraded toauth.login ⇒ signals.user_logged_in(the Variable node,.sendswallowed). ~9.6K true edges lost, ~7.1K degraded edges gained.Fix (ready locally, reproduce-first): take the direct hit only when the callee has no suffix — which is precisely #979's intended case (
from m import f as g; g()). With the fix: django CALLS 74,708 (= old + 23 genuine #979 wins), TESTS 38,035; #979's ownresolve_import_map_bare_aliastest stays green; new guardresolve_import_map_alias_with_suffix_hits_methodis RED on current main and GREEN with the fix (registry suite 56/56).Not in any release — v0.9.0 predates #979; needs to land before 0.9.1. Thanks @LA-10 for #979 itself — the feature is kept intact, only the early-return gets the suffix guard.