Files
codebase-memory-mcp/tests
Martin Vogel f4f9ed47f6 feat(py_lsp): cross-file resolution + batch entry point
Phase 9 of Python LSP integration. Implements cbm_run_py_lsp_cross and
cbm_batch_py_lsp_cross, mirroring the Go LSP pattern:

- cbm_run_py_lsp_cross builds a per-call registry from caller-supplied
  CBMLSPDef[] entries (covering both file-local and cross-file
  definitions), then re-parses the source via tree_sitter_python (or
  uses cached_tree when supplied) and runs the standard
  py_lsp_process_file pipeline.
- py_register_lsp_defs translates CBMLSPDef shapes into
  CBMRegisteredType / CBMRegisteredFunc entries. Python-specific
  Protocol label is recognized as an interface-like structural type.
  Pipe-separated embedded_types and method_names_str are split into
  arena-allocated NULL-terminated arrays. Method receivers auto-create
  type entries when the type isn't otherwise registered, matching the
  Go convention.
- cbm_batch_py_lsp_cross loops the per-file entry, isolating each file
  in its own arena and copying string fields into the caller's arena
  so they outlive the file's scratch space.

3 new test_py_lsp.c cases cover cross-file method dispatch, cross-file
inheritance (Child(Base) calling self.shared from another module), and
batch processing of two interconnected files. All 2866 prior tests stay
green; 3 new cross-file tests pass.
2026-05-09 00:17:59 +02:00
..
…
2026-04-15 23:56:03 +02:00