Files
codebase-memory-mcp/tests
xkchok 8f50841af4 fix(go): resolve cross-package field-chain calls via type dispatch
Go calls written through an aliased struct field (h.svc.Method(ctx,
req)) previously fell through to fuzzy suffix matching because:

- the per-file Go dispatch walk was bypassed, so field selectors were
  never descended;
- struct fields extracted as flat "Field" defs were dropped by the LSP
  label map, so every Go struct registered with zero fields;
- receiver types written through import aliases (svc.Svc) produced
  qualified names that exist nowhere in the project registry.

Changes:

- restore the Go walk in cbm_pxc_dispatch_file and descend field
  selectors through the shared prebuilt registry, emitting
  lsp_type_dispatch edges;
- fold per-field defs into their owning struct inside
  cbm_pxc_collect_all_defs (one site covers both the prebuilt-registry
  path and the per-file fallback);
- re-qualify the last alias segment through the calling file's import
  map when the direct receiver-type lookup misses
  (go_requalify_via_imports).

Tests:

- tests/test_parallel.c: cross-package field chain resolves end to end
  with an lsp_type_dispatch edge in the parallel resolver;
- tests/test_go_lsp.c: alias-typed struct field re-qualifies through
  the import map and lands on the real receiver type.

Signed-off-by: xkchok <143325001+xkchok@users.noreply.github.com>
2026-09-01 15:51:50 +08:00
..
2026-06-28 13:05:05 +02:00