GitNexus/gitnexus/test/integration/resolvers
Copilot 79e1d933fa
fix: resolve generic TypeScript awaited function calls missing from call graph (#804)
* Initial plan

* fix: resolve generic TypeScript function callers missed by impact analysis

When a generic function call is combined with `await` (e.g. `await fn<T>(args)`),
tree-sitter-typescript parses it as a `call_expression` whose `function` field is
an `await_expression` rather than a bare `identifier`. The existing queries only
matched `call_expression { function: identifier }`, so these calls produced no
`@call.name` capture and were silently dropped from the call graph.

Fix: add two new tree-sitter query patterns to `TYPESCRIPT_QUERIES` that handle:
1. `await fn<T>(args)` — awaited generic free call
2. `await obj.fn<T>(args)` — awaited generic member call

Both patterns require the `(type_arguments)` child to be present (which is what
causes tree-sitter to parse the `function` field as an `await_expression`).
Non-generic awaited calls (`await fn(args)`) are unaffected: tree-sitter parses
them as `await_expression { call_expression { identifier } }`, which is still
captured by the existing first pattern.

Also adds a new test fixture `typescript-generic-calls` with two callers of a
generic `verifyToken<T>` function using `await` and three new integration tests.

Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/4cf75290-900b-4cea-8a65-2a245ff86970

Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com>

* fix: clean up test fixture interface ordering and imports

Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/4cf75290-900b-4cea-8a65-2a245ff86970

Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com>

* test: add coverage for awaited generic member-call form (await obj.fn<T>())

Address review feedback: the member-call query pattern was untested.

Adds service.ts (TokenService with generic verify<T> method) and guest.ts
(calls await svc.verify<GuestPayload>()) to the typescript-generic-calls
fixture, plus a new integration test asserting the CALLS edge resolves.

Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/fcbf8d99-8dbc-40ce-b2a3-60b8d63c095a

Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com>

* revert: undo accidental ladybugdb version bump in package files

Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/fcbf8d99-8dbc-40ce-b2a3-60b8d63c095a

Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com>

* style: run prettier on changed files

Agent-Logs-Url: https://github.com/abhigyanpatwari/GitNexus/sessions/8c7d8291-74bb-4a86-ae47-7c79e2cbb57e

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: magyargergo <11230420+magyargergo@users.noreply.github.com>
2026-04-13 10:16:42 +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): capture interface-to-interface heritage (#789) 2026-04-11 17:41:51 +01:00
dart.test.ts SM-10: Add MRO fast path before D2 fuzzy widening in resolveCallTarget (#741) 2026-04-08 23:24:07 +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 SM-10: Add MRO fast path before D2 fuzzy widening in resolveCallTarget (#741) 2026-04-08 23:24:07 +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 Extract resolveMemberCall from resolveCallTarget (SM-11) (#744) 2026-04-09 09:52:12 +01:00
route-mapping.test.ts feat: configure eslint with unused import removal (#564) 2026-03-28 15:28:09 +00:00
ruby.test.ts SM-10: Add MRO fast path before D2 fuzzy widening in resolveCallTarget (#741) 2026-04-08 23:24:07 +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: resolve generic TypeScript awaited function calls missing from call graph (#804) 2026-04-13 10:16:42 +01:00
vue.test.ts feat(vue): Vue SFC support + destructured call result tracking (#604) 2026-04-03 14:18:55 +05:30