mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-10 09:13:53 +08:00
Runtime-diagnosed (LSPDIAG2 at the pass_calls join) LSP-strategy reds. NESTED-CLASS ENCLOSING QN (cbm_enclosing_func_qn, helpers.c): a method in a nested class was qualified with only the INNERMOST class (Inner), not the full chain (Outer.Inner) that the def walk's compute_class_qn produces. So a call inside a nested-class method sourced to the file node (callable=0) AND its enclosing_func_qn failed to equal the LSP-resolved caller QN (strategy ABSENT, e.g. lsp_outer_dispatch). Build the full outer->inner dotted class chain so the enclosing QN matches the class/method node QN. Single-class and top-level cases are unchanged (the chain collapses to the prior value). CONSTRUCTOR RESOLUTION (cs_lsp.c cs_resolve_object_creation, java_lsp.c): `new Foo()` synthesized a callee `Foo..ctor` / `Foo.Foo` whose ".ctor"/doubled short name joined nothing (call callee_name is "Foo") and pointed at a non-existent node -> no edge (cs_ctor, cs_ctor_synthetic, lsp_constructor, lsp_constructor_synth all dead). A C#/Java constructor registers as <type_qn>.<ClassShortName>, so look it up by the class short name; when no explicit ctor exists, resolve the call to the existing Foo CLASS node (short name "Foo" == callee_name -> join matches, node exists -> edge forms carrying the strategy). Reproduced by repro_lsp_java_cs (nested-dispatch + constructor strategies RED). NOTE: the *_unindexed / lsp_unresolved strategies are intentionally below the confidence floor and target missing symbols (no edge can exist) -- flagged separately as likely test-scope issues, not fixed here. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>