From 14d0fda13ac1bddd24ebd591acaa5c9e2a0650ca Mon Sep 17 00:00:00 2001 From: Martin Vogel Date: Tue, 13 Oct 2026 00:17:49 +0200 Subject: [PATCH] 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 --- tests/test_complexity.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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); } }