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

Function has_strategy

tests/test_configlink.c:38–46  ·  view source on GitHub ↗

Helper to check if any CONFIGURES edge has a given strategy (parsed from JSON) */

Source from the content-addressed store, hash-verified

36
37/* Helper to check if any CONFIGURES edge has a given strategy (parsed from JSON) */
38static bool has_strategy(const cbm_gbuf_edge_t **edges, int count, const char *strategy) {
39 char needle[64];
40 snprintf(needle, sizeof(needle), "\"strategy\":\"%s\"", strategy);
41 for (int i = 0; i < count; i++) {
42 if (edges[i]->properties_json && strstr(edges[i]->properties_json, needle))
43 return true;
44 }
45 return false;
46}
47
48/* Check if any CONFIGURES edge has given strategy AND confidence. */
49static bool has_strategy_with_confidence(const cbm_gbuf_edge_t **edges, int count,

Callers 1

test_configlink.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected