MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / idx773_double_index_check

Function idx773_double_index_check

tests/test_mcp.c:22211–22232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22209}
22210
22211static int idx773_double_index_check(const char *dir_a, const char *dir_b) {
22212 cbm_setenv("CBM_INDEX_SUPERVISOR", "0", 1);
22213 cbm_mcp_server_t *srv = cbm_mcp_server_new(NULL);
22214 if (!srv) {
22215 return IDX773_FIRST_FAILED;
22216 }
22217 char args[CBM_SZ_512];
22218 snprintf(args, sizeof(args), "{\"repo_path\":\"%s\",\"mode\":\"full\"}", dir_a);
22219 char *r1 = cbm_mcp_handle_tool(srv, "index_repository", args);
22220 bool ok1 = r1 && strstr(r1, "indexed") != NULL;
22221 free(r1);
22222 if (!ok1) {
22223 cbm_mcp_server_free(srv);
22224 return IDX773_FIRST_FAILED;
22225 }
22226 snprintf(args, sizeof(args), "{\"repo_path\":\"%s\",\"mode\":\"full\"}", dir_b);
22227 char *r2 = cbm_mcp_handle_tool(srv, "index_repository", args); /* SIGABRT here (RED) */
22228 bool ok2 = r2 && strstr(r2, "indexed") != NULL;
22229 free(r2);
22230 cbm_mcp_server_free(srv);
22231 return ok2 ? IDX773_OK : IDX773_SECOND_FAILED;
22232}
22233#endif /* !_WIN32 */
22234
22235/* #898: the SEQUENTIAL pipeline emitted malformed JSON for brokered

Callers 1

test_mcp.cFile · 0.85

Calls 4

cbm_setenvFunction · 0.85
cbm_mcp_server_newFunction · 0.85
cbm_mcp_handle_toolFunction · 0.85
cbm_mcp_server_freeFunction · 0.85

Tested by

no test coverage detected