Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

test(complexity): recognize the pyext control call by its LSP strategy

Martin Vogel14d0fda13ac1
diff --git a/tests/test_complexity.c b/tests/test_complexity.c
index 76acfd09c..758bc7c88 100644
--- a/tests/test_complexity.c
+++ b/tests/test_complexity.c
@@ -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);
}
}