mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-10-29 07:13:44 +08:00
docs(cli): list dependency ranking config
search_graph already reads search_disable_dep_ranking, and the MCP schema names that config key. Add it to CBM_CONFIG_REGISTRY so config list/get guidance exposes the same setting users see in the API description. Add a CLI registry regression test for the key, default, range, and dependency-ranking guidance. This does not change search behavior, MCP schemas, DB schema, or tool visibility. Validated with make -f Makefile.cbm build/c/test-runner, CBM_ONLY_SUITE=cli ./build/c/test-runner, CBM_ONLY_SUITE=tool_consolidation ./build/c/test-runner, git diff --check, and bash scripts/check-source-safety.sh. Signed-off-by: Andrew Hundt <ATHundt@gmail.com>
This commit is contained in:
@@ -2887,6 +2887,11 @@ const cbm_config_entry_t CBM_CONFIG_REGISTRY[] = {
|
||||
"true|false",
|
||||
"false = restrict to project code only (exclude dep sub-projects). "
|
||||
"Set false for single-project focus workflows."},
|
||||
{"search_disable_dep_ranking", "false", NULL, "Tools",
|
||||
"Disable project-before-dependency ranking in search_graph",
|
||||
"true|false",
|
||||
"false (default) ranks project symbols before dependency symbols when include_dependencies=true. "
|
||||
"true uses pure relevance order across project and dependency symbols."},
|
||||
/* ── PageRank ── */
|
||||
{"pagerank_max_iter", "20", NULL, "PageRank",
|
||||
"Max iterations for PageRank algorithm before stopping (more = more accurate convergence)",
|
||||
|
||||
@@ -2766,6 +2766,23 @@ TEST(cli_config_get_effective_env_overrides_db) {
|
||||
PASS();
|
||||
}
|
||||
|
||||
TEST(cli_config_registry_includes_dep_ranking_toggle) {
|
||||
const cbm_config_entry_t *found = NULL;
|
||||
for (int i = 0; CBM_CONFIG_REGISTRY[i].key; i++) {
|
||||
if (strcmp(CBM_CONFIG_REGISTRY[i].key, "search_disable_dep_ranking") == 0) {
|
||||
found = &CBM_CONFIG_REGISTRY[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ASSERT_NOT_NULL(found);
|
||||
ASSERT_STR_EQ(found->default_val, "false");
|
||||
ASSERT_STR_EQ(found->range, "true|false");
|
||||
ASSERT_NOT_NULL(strstr(found->description, "search_graph"));
|
||||
ASSERT_NOT_NULL(strstr(found->guidance, "dependency"));
|
||||
PASS();
|
||||
}
|
||||
|
||||
TEST(cli_config_delete) {
|
||||
char tmpdir[256];
|
||||
snprintf(tmpdir, sizeof(tmpdir), "/tmp/cli-cfg-XXXXXX");
|
||||
@@ -3085,6 +3102,7 @@ SUITE(cli) {
|
||||
RUN_TEST(cli_config_get_bool);
|
||||
RUN_TEST(cli_config_get_int);
|
||||
RUN_TEST(cli_config_get_effective_env_overrides_db);
|
||||
RUN_TEST(cli_config_registry_includes_dep_ranking_toggle);
|
||||
RUN_TEST(cli_config_delete);
|
||||
RUN_TEST(cli_config_persists);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user