mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-04 10:48:20 +00:00
test(complexity): recognize the pyext control call by its LSP strategy
cx_pyext_control looked for a "source":"lsp" property that CALLS edges never carry, so the control count was always zero and complexity_py_submodule_probe_avoids_registry_scan failed even though every cx_pyext_use() kept its local call. An LSP resolution records an lsp_* strategy (lsp_direct for this call), the same check the pipeline tests use. Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
This commit is contained in:
1 parent
033c1e0116
commit
14d0fda13a
1 file changed
+4
-3
@@ -491,11 +491,12 @@ static bool cx_pyext_control(cbm_store_t *store, const char *project, const cbm_
|
||||
for (int i = 0; i < count; i++) {
|
||||
if (edges[i].target_id != target.id || !edges[i].properties_json)
|
||||
continue;
|
||||
/* an LSP resolution records an lsp_* strategy (lsp_direct here) */
|
||||
yyjson_doc *doc =
|
||||
yyjson_read(edges[i].properties_json, strlen(edges[i].properties_json), 0);
|
||||
const char *source =
|
||||
doc ? yyjson_get_str(yyjson_obj_get(yyjson_doc_get_root(doc), "source")) : NULL;
|
||||
found = found || (source && strcmp(source, "lsp") == 0);
|
||||
const char *strategy =
|
||||
doc ? yyjson_get_str(yyjson_obj_get(yyjson_doc_get_root(doc), "strategy")) : NULL;
|
||||
found = found || (strategy && strncmp(strategy, "lsp_", 4) == 0);
|
||||
yyjson_doc_free(doc);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user