@@ -805,6 +805,28 @@ TEST(tsjs_suppress_keeps_high_confidence_and_non_methods) {
805805
806806/* ── Suite ─────────────────────────────────────────────────────── */
807807
808+ /* Method call THROUGH an imported symbol that is itself an indexed node
809+ * (`from m import sig; sig.send()`). The import-map value is the symbol QN
810+ * and the callee carries a suffix — resolution must return symbol.send, NOT
811+ * the bare symbol node. The #979 direct-hit early return swallowed the
812+ * suffix whenever the base symbol existed as an exact node, degrading
813+ * django-scale graphs by ~11K CALLS/TESTS edges (e.g. every
814+ * `user_logged_in.send(...)` bound to the signal VARIABLE instead of
815+ * Signal.send). Regression guard for #1000. */
816+ TEST (resolve_import_map_alias_with_suffix_hits_method ) {
817+ cbm_registry_t * r = cbm_registry_new ();
818+ cbm_registry_add (r , "user_logged_in" , "proj.auth.signals.user_logged_in" , "Variable" );
819+ cbm_registry_add (r , "send" , "proj.auth.signals.user_logged_in.send" , "Method" );
820+ const char * keys [] = {"user_logged_in" };
821+ const char * vals [] = {"proj.auth.signals.user_logged_in" };
822+ cbm_resolution_t res =
823+ cbm_registry_resolve (r , "user_logged_in.send" , "proj.auth.views" , keys , vals , 1 );
824+ ASSERT_STR_EQ (res .qualified_name , "proj.auth.signals.user_logged_in.send" );
825+ ASSERT_STR_EQ (res .strategy , "import_map" );
826+ cbm_registry_free (r );
827+ PASS ();
828+ }
829+
808830SUITE (registry ) {
809831 /* FQN */
810832 RUN_TEST (fqn_simple );
@@ -838,6 +860,7 @@ SUITE(registry) {
838860 RUN_TEST (resolve_import_map );
839861 RUN_TEST (resolve_import_map_bare_function );
840862 RUN_TEST (resolve_import_map_bare_alias );
863+ RUN_TEST (resolve_import_map_alias_with_suffix_hits_method );
841864 RUN_TEST (resolve_unique_name );
842865 RUN_TEST (resolve_unresolved );
843866 RUN_TEST (resolve_many_nodes );
0 commit comments