From 4a2ad91ce9dccee8158f94aabe039d2fb3554f10 Mon Sep 17 00:00:00 2001 From: Martin Vogel Date: Tue, 13 Oct 2026 00:33:09 +0200 Subject: [PATCH] test(complexity): recognize the pyrange control calls by LSP strategy cx_pyrange_exact_control counted edges with a "source":"lsp" property that CALLS edges never carry, so every control failed and complexity_py_module_ranges_preserve_calls_with_bounded_work reported zero controls. Count edges whose strategy is lsp_*, the way the pyext control and the pipeline tests recognize an LSP resolution. 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 f52a11ab9..a67d0d753 100644 --- a/tests/test_complexity.c +++ b/tests/test_complexity.c @@ -612,9 +612,10 @@ static bool cx_pyrange_exact_control(cbm_store_t *store, const char *project, edges[i].properties_json ? yyjson_read(edges[i].properties_json, strlen(edges[i].properties_json), 0) : NULL; - const char *source = - doc ? yyjson_get_str(yyjson_obj_get(yyjson_doc_get_root(doc), "source")) : NULL; - if (source && strcmp(source, "lsp") == 0) + /* an LSP resolution records an lsp_* strategy */ + const char *strategy = + doc ? yyjson_get_str(yyjson_obj_get(yyjson_doc_get_root(doc), "strategy")) : NULL; + if (strategy && strncmp(strategy, "lsp_", 4) == 0) exact++; yyjson_doc_free(doc); }