GitNexus/gitnexus/test/integration
Flavius Miron 3c896cdbcd
fix: close remaining Dart language support gaps (#524)
* fix: close remaining Dart language support gaps

Four issues that were not addressed in PR #204:

1. extractFunctionName: add function_signature/method_signature handlers
   and add both to FUNCTION_NODE_TYPES. Without this, findEnclosingFunctionId
   cannot resolve Dart function scopes — all calls inside Dart functions
   have no sourceId, breaking CALLS edge attribution.

2. formal_parameter_list: add to paramListTypes in extractMethodSignature.
   Dart's tree-sitter grammar uses this node type (not formal_parameters),
   so parameter counting returns 0 for all Dart functions.

3. Write-access queries: add @assignment patterns for obj.field = value
   and this.field = value. Without these, no ACCESSES write edges are
   emitted for Dart code.

4. initialized_identifier guard in extractDartDeclaration: comma-separated
   declarations (String a, b, c) produce initialized_identifier nodes
   which are in DART_DECLARATION_NODE_TYPES but were unhandled — the type
   lives on the parent node.

Also adds Dart column to the feature matrix in type-resolution-system.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(dart): field-type resolution, call attribution, import resolution, and integration tests

Fixes five Dart language support gaps with integration tests and
architectural alignment:

**Tree-sitter queries** — Add field declaration patterns for typed and
nullable class fields (`String name = ''`, `String? name`).  Without
these, Dart class fields were invisible to the pipeline (zero Property
nodes, zero HAS_PROPERTY edges).

**Import resolution** — Dart relative imports (`import 'models.dart'`)
don't use a leading `./`.  The standard resolver only recognises paths
starting with `.` as relative; bare paths fell through to a Java-style
dot-to-slash conversion that mangled `models.dart` into `models/dart`.
Fix: prepend `./` before calling resolveStandard.

**Call attribution** — Dart's tree-sitter grammar places `function_body`
as a sibling of `function_signature`, not as a child wrapping both.  The
`findEnclosingFunction` parent-walk never found the function because the
call lives inside `function_body` which is a sibling of the signature.
Fix: add `enclosingFunctionFinder` hook to LanguageProvider interface
(following the same strategy pattern as `labelOverride`), with the
Dart-specific logic in `languages/dart.ts`.  Both `parse-worker.ts` and
`call-processor.ts` consume the hook generically — no Dart-specific code
in the generic processors.

**Receiver chain extraction** — Add `unconditional_assignable_selector`
to `MEMBER_ACCESS_NODE_TYPES` so `inferCallForm` returns `'member'` for
Dart method calls.  Add Dart-specific receiver extraction blocks in
`extractReceiverName`, `extractReceiverNode`, and a `selector` handler
in `extractMixedChain` for Dart's flat sibling-selector model (vs the
nested member-expression model used by all other languages).

**Integration tests** — New `dart.test.ts` with field-type resolution
and call-result-binding describe blocks.  Fixtures: `dart-field-types/`
(models.dart + app.dart) and `dart-call-result-binding/` (models.dart +
app.dart).  9 passing tests, 1 skipped (ACCESSES edges for field reads
depend on type-env parameter binding propagation — tracked for follow-up).

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Gergo Magyar <gergomagyar@icloud.com>
2026-03-26 13:45:24 +00:00
..
resolvers fix: close remaining Dart language support gaps (#524) 2026-03-26 13:45:24 +00:00
api-impact-e2e.test.ts feat: deep flow detection — consumer access tracking, middleware chains, error shapes, api_impact tool (#482) 2026-03-23 22:13:48 +00:00
augmentation.test.ts refactor: migrate from KuzuDB to LadybugDB v0.15 (#275) 2026-03-15 15:53:01 +00:00
class-impact-all-languages.test.ts fix(#480): resolve impact/context returning empty results for Java cl… (#489) 2026-03-24 21:46:46 +00:00
cli-e2e.test.ts fix: address PR review — TTY guard, test rename, unify debug env var 2026-03-25 11:39:37 +05:30
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
expo-routes.test.ts feat: add Expo Router file-based route detection (#503) 2026-03-25 11:05:55 +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 refactor: SICP-informed LanguageProvider architecture (#488) 2026-03-24 13:42:39 +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
java-class-impact.test.ts fix(#480): resolve impact/context returning empty results for Java cl… (#489) 2026-03-24 21:46:46 +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
orm-dataflow.test.ts feat: add ORM dataflow detection (Prisma + Supabase) (#511) 2026-03-26 08:48:40 +00:00
parsing.test.ts refactor: SICP-informed LanguageProvider architecture (#488) 2026-03-24 13:42:39 +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 refactor: SICP-informed LanguageProvider architecture (#488) 2026-03-24 13:42:39 +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
shape-check-regression.test.ts fix: shape_check false positives — quoted keys, DOM leaks, errorKeys (#501) 2026-03-26 05:43:37 +00: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 feat: add Dart language support (#204) 2026-03-26 08:42:49 +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