GitNexus/gitnexus/test/integration
Shunsuke Hayashi f90aabf9a8 fix(python): resolve module-qualified calls via moduleAliasMap
Previously, Python was added to WILDCARD_IMPORT_LANGUAGES which expanded
all exported symbols into namedImportMap using first-seen wins. This caused
`auth.User()` to incorrectly resolve to `models.py:User` when both modules
exported a class named User.

Root cause: Python `import models` is a namespace import, not wildcard
symbol expansion. Expanding all symbols produces ambiguous bindings that
cannot be disambiguated later.

Fix:
- Remove Python from WILDCARD_IMPORT_LANGUAGES
- Add ModuleAliasMap (callerFile → alias → sourceFile) to ResolutionContext
- In synthesizeWildcardImportBindings, build moduleAliasMap for Python
  using the filename stem as the module alias
- In resolveCallTarget, add module-alias disambiguation step: when multiple
  candidates survive filtering and the receiver name matches a module alias,
  narrow candidates to the aliased file

Result: `models.User()` → models.py:User, `auth.User()` → auth.py:User
even when both modules export a class named User.

Adds regression test for the ambiguity case.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 16:33:06 +09:00
..
resolvers fix(python): resolve module-qualified calls via moduleAliasMap 2026-03-23 16:33:06 +09:00
augmentation.test.ts refactor: migrate from KuzuDB to LadybugDB v0.15 (#275) 2026-03-15 15:53:01 +00:00
cli-e2e.test.ts fix(test): add --repo to CLI e2e tool tests for multi-repo environment 2026-03-18 08:12:25 +00:00
cross-file-binding.test.ts feat(type-resolution): Phase 14 enhancements — single-pass seeding, Tarjan's SCC, cross-file return types 2026-03-20 12:00:36 +00:00
csv-pipeline.test.ts refactor: migrate from KuzuDB to LadybugDB v0.15 (#275) 2026-03-15 15:53:01 +00:00
enrichment.test.ts test: add integration test coverage and fix KuzuDB fork crashes (#209) 2026-03-08 18:00:45 +00:00
filesystem-walker.test.ts feat(ingestion): respect .gitignore and .gitnexusignore during file discovery (#231) 2026-03-16 13:26:20 +00:00
has-method.test.ts feat: language-aware code intelligence — symbol resolution, MRO, constructor discrimination (#238) 2026-03-13 13:12:23 +00:00
hooks-e2e.test.ts test: add integration test coverage and fix KuzuDB fork crashes (#209) 2026-03-08 18:00:45 +00:00
ignore-and-skip-e2e.test.ts feat(ingestion): respect .gitignore and .gitnexusignore during file discovery (#231) 2026-03-16 13:26:20 +00:00
lbug-core-adapter.test.ts feat: upgrade @ladybugdb/core to 0.15.2 and remove segfault workarounds (#374) 2026-03-19 08:25:43 +00:00
lbug-lock-retry.test.ts fix(lbug): retry on DB lock with session-safe cleanup (#325) 2026-03-22 18:21:21 +09:00
lbug-pool-stability.test.ts fix: MCP server crashes under parallel tool calls (#326) (#349) 2026-03-18 13:02:01 +00:00
lbug-pool.test.ts refactor: migrate from KuzuDB to LadybugDB v0.15 (#275) 2026-03-15 15:53:01 +00:00
local-backend-calltool.test.ts fix(impact): return structured error + partial results instead of crashing (#321) (#345) 2026-03-18 06:45:43 +00:00
local-backend.test.ts feat: upgrade @ladybugdb/core to 0.15.2 and remove segfault workarounds (#374) 2026-03-19 08:25:43 +00:00
parsing.test.ts refactor: unify language dispatch with compile-time exhaustive tables 2026-03-21 11:48:11 +00:00
pipeline.test.ts test: add integration test coverage and fix KuzuDB fork crashes (#209) 2026-03-08 18:00:45 +00:00
query-compilation.test.ts fix: consolidate C/C++/C#/Rust language support from 6 overlapping PRs (#237) 2026-03-10 23:03:32 +00:00
search-core.test.ts refactor: migrate from KuzuDB to LadybugDB v0.15 (#275) 2026-03-15 15:53:01 +00:00
search-pool.test.ts refactor: migrate from KuzuDB to LadybugDB v0.15 (#275) 2026-03-15 15:53:01 +00:00
setup-skills.test.ts test(cli): cover full Codex setup flow 2026-03-20 15:28:42 +01:00
skills-e2e.test.ts fix: register Section in NODE_TABLES and NODE_SCHEMA_QUERIES (#401) 2026-03-21 04:00:16 +05:30
staleness-and-stability.test.ts fix(test): unify staleness-and-stability into single withTestLbugDB block 2026-03-20 21:06:30 +09:00
tree-sitter-languages.test.ts fix: consolidate C/C++/C#/Rust language support from 6 overlapping PRs (#237) 2026-03-10 23:03:32 +00:00
worker-pool.test.ts test: add integration test coverage and fix KuzuDB fork crashes (#209) 2026-03-08 18:00:45 +00:00