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.

Merge branch 'main' into fix/autoindex-skip-limit-value-1466

Martin Vogel98e386e58b75
diff --cc src/mcp/mcp.c
index f01f056c5,73534404a..7d81b7448
--- a/src/mcp/mcp.c
+++ b/src/mcp/mcp.c
@@@ -11656,14 -12889,17 +12889,19 @@@ static void maybe_auto_index(cbm_mcp_se
/* Quick tracked-file count check to avoid OOM on massive repos. */
int file_count = -1;
+ #ifdef CBM_ENABLE_TEST_SEAMS
+ if (srv->auto_index_count_test_hook) {
+ srv->auto_index_count_test_hook(srv->auto_index_count_test_context);
+ }
+ #endif
if (!cbm_mcp_auto_index_within_file_limit(srv->session_root, file_limit, &file_count)) {
char files[32];
+ char limit[32];
(void)snprintf(files, sizeof(files), "%d", file_count);
+ (void)snprintf(limit, sizeof(limit), "%d", file_limit);
cbm_log_warn("autoindex.skip", "reason",
file_count >= 0 ? "too_many_files" : "unsafe_or_unavailable_path", "files",
- files, "limit", CBM_CONFIG_AUTO_INDEX_LIMIT);
+ files, "limit", limit);
return;
}