GitNexus/gitnexus/test/integration/resolvers
Gergo Magyar ae0bd74dd6 fix(scope): address Codex adversarial review findings on PR #1050
Four findings from the Codex adversarial review broke registry-primary
TypeScript resolution for common patterns. All four now have unit and
integration regression coverage that pass under both
`REGISTRY_PRIMARY_TYPESCRIPT=0` (legacy DAG) and the default
registry-primary path.

[high] tsconfig path aliases dropped:
Threaded `tsconfigPaths` through ScopeResolver via a new opaque
`resolutionConfig` parameter and a `loadResolutionConfig(repoPath)`
hook. The orchestrator (`scopeResolutionPhase` + `runScopeResolution`)
loads it once per workspace pass and forwards into every
`resolveImportTarget` call. TypeScript resolver now resolves
`@/services/user` style imports through the standard resolver's alias
branch.

[high] TSX parsed with the wrong grammar:
`emitTsScopeCaptures` now picks the parser/query by `filePath`
(`.tsx` -> TSX grammar) and validates cached trees against the
expected grammar via the new exported `tsCachedTreeMatchesGrammar`
helper. Stale TS-grammar trees for `.tsx` files no longer leak through
the scope query.

[medium] Literal dynamic imports never linked:
Added `kind: 'dynamic-resolved'` to `ParsedImport` and `ImportEdge`.
The decomposer emits a synthetic `@import.literal` capture for
string-literal dynamic imports; the interpreter maps that to
`dynamic-resolved`; finalize pre-finalizes it as a file-level terminal
(same shape as `side-effect`). `import('./feature')` now produces a
real IMPORTS edge under the registry-primary path. Legacy DAG keeps
its existing behavior — the new integration assertion is gated behind
the flag.

[medium] Namespace re-exports invisible from barrels:
The decomposer now emits TWO captures for `export * as ns from './m'`
— the existing `reexport-namespace` import draft AND a synthetic
`@declaration.namespace` capture (via `buildNamespaceDeclarationMatch`).
The latter creates a Namespace `SymbolDefinition` in the barrel's
`localDefs`, so downstream `import { ns } from './barrel'` resolves
through `findExportByName`.

Regression fixtures under `gitnexus/test/fixtures/lang-resolution/`:
- typescript-tsconfig-aliases (`@/` alias)
- typescript-tsx-jsx (Button.tsx + App.tsx with JSX)
- typescript-dynamic-import (`await import('./feature')`)
- typescript-reexport-namespace (`export * as Models from './base'`)

Validation:
- gitnexus-shared builds clean
- gitnexus typecheck clean
- 385/385 TS scope-resolution tests pass under both
  `REGISTRY_PRIMARY_TYPESCRIPT=0` and default

Made-with: Cursor
2026-04-25 09:24:07 +01:00
..
api-deep-flow.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
cobol.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
cpp.test.ts Extract resolveMemberCall from resolveCallTarget (SM-11) (#744) 2026-04-09 09:52:12 +01:00
csharp.test.ts feat(csharp): migrate C# to registry-primary scope-resolution (Closes #934) (#1019) 2026-04-23 12:38:13 +01:00
dart.test.ts [dart] Add call patterns for await, cascade, lambda, and widget-tree contexts (#801) 2026-04-13 11:21:11 +01:00
express-routes.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
go.test.ts fix(go): align worker CALLS source IDs for receiver methods (#1043) 2026-04-23 08:08:56 +01:00
helpers.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
java.test.ts Extract resolveMemberCall from resolveCallTarget (SM-11) (#744) 2026-04-09 09:52:12 +01:00
javascript.test.ts feat(SM-9): Add lookupMethodByOwnerWithMRO using HeritageMap (#740) 2026-04-08 20:46:45 +01:00
kotlin.test.ts Extract resolveMemberCall from resolveCallTarget (SM-11) (#744) 2026-04-09 09:52:12 +01:00
php-response-shapes.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
php.test.ts SM-10: Add MRO fast path before D2 fuzzy widening in resolveCallTarget (#741) 2026-04-08 23:24:07 +01:00
python-mcp-tools.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
python.test.ts feat(csharp): migrate C# to registry-primary scope-resolution (Closes #934) (#1019) 2026-04-23 12:38:13 +01:00
route-mapping.test.ts feat: configure eslint with unused import removal (#564) 2026-03-28 15:28:09 +00:00
ruby-sequential-mixin.test.ts feat(ingestion): language-agnostic heritage extractor with config+factory pattern (#890) 2026-04-17 17:51:17 +01:00
ruby.test.ts feat(ingestion): language-agnostic heritage extractor with config+factory pattern (#890) 2026-04-17 17:51:17 +01:00
rust.test.ts Extract resolveMemberCall from resolveCallTarget (SM-11) (#744) 2026-04-09 09:52:12 +01:00
shape-check.test.ts feat: configure prettier with pre-commit hook (#563) 2026-03-28 14:58:04 +00:00
swift.test.ts SM-10: Add MRO fast path before D2 fuzzy widening in resolveCallTarget (#741) 2026-04-08 23:24:07 +01:00
typescript.test.ts fix(scope): address Codex adversarial review findings on PR #1050 2026-04-25 09:24:07 +01:00
vue.test.ts feat(vue): Vue SFC support + destructured call result tracking (#604) 2026-04-03 14:18:55 +05:30