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.
C aiderastclaude-codecode-analysiscode-intelligencecodexcursorcypherdeveloper-toolsgemini-cligraph-visualizationkilocodeknowledge-graphmcpmcp-servermodel-context-protocolopencodesqlitetree-sitterwindsurf
fix(discover): deploy/ directories indexed as duplicate source in full mode
Thomas Dyarbfd53f33ec9b
diff --git a/src/discover/discover.c b/src/discover/discover.cindex 314c00c53..1d07be4a9 100644--- a/src/discover/discover.c+++ b/src/discover/discover.c@@ -42,7 +42,7 @@ static const char *ALWAYS_SKIP_DIRS[] = {".cargo", ".stack-work", ".dart_tool", "zig-cache", "zig-out", ".metals", ".bloop", ".bsp",".ccls-cache", ".clangd", "elm-stuff", "_opam", ".cpcache", ".shadow-cljs",/* Deploy */- ".vercel", ".netlify",+ ".vercel", ".netlify", "deploy", "deployed",/* Misc */".qdrant_code_embeddings", ".tmp", "vendor", "vendored", NULL};diff --git a/tests/test_discover.c b/tests/test_discover.cindex af51a9286..ddaab0bf7 100644--- a/tests/test_discover.c+++ b/tests/test_discover.c@@ -605,6 +605,27 @@ TEST(discover_generic_dirs_fast_mode) {PASS();}+TEST(discover_deploy_excluded_full_mode) {+ char *base = th_mktempdir("cbm_disc_deploy");+ ASSERT(base != NULL);++ th_write_file(TH_PATH(base, "src/main.go"), "package main\n");+ th_write_file(TH_PATH(base, "deploy/main.go"), "package deploy\n");+ th_write_file(TH_PATH(base, "deployed/main.go"), "package deployed\n");++ cbm_discover_opts_t opts = {.mode = CBM_MODE_FULL};+ cbm_file_info_t *files = NULL;+ int count = 0;++ int rc = cbm_discover(base, &opts, &files, &count);+ ASSERT_EQ(rc, 0);+ ASSERT_EQ(count, 1);++ cbm_discover_free(files, count);+ th_cleanup(base);+ PASS();+}+TEST(discover_cbmignore_no_git) {char *base = th_mktempdir("cbm_disc_nogit");ASSERT(base != NULL);@@ -792,6 +813,7 @@ SUITE(discover) {RUN_TEST(discover_new_ignore_patterns);RUN_TEST(discover_generic_dirs_full_mode);RUN_TEST(discover_generic_dirs_fast_mode);+ RUN_TEST(discover_deploy_excluded_full_mode);RUN_TEST(discover_cbmignore_no_git);/* Nested .gitignore tests (issue #178) */