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

Function c1_props_contain

tests/test_pipeline.c:14283–14292  ·  view source on GitHub ↗

Do the properties of the node ` . ` contain `needle`? */

Source from the content-addressed store, hash-verified

14281
14282/* Do the properties of the node `<project>.<qn_tail>` contain `needle`? */
14283static bool c1_props_contain(cbm_store_t *s, const char *project, const char *qn_tail,
14284 const char *needle) {
14285 char qn[512];
14286 snprintf(qn, sizeof(qn), "%s.%s", project, qn_tail);
14287 cbm_node_t node = {0};
14288 bool found = cbm_store_find_node_by_qn(s, project, qn, &node) == CBM_STORE_OK &&
14289 node.properties_json && strstr(node.properties_json, needle) != NULL;
14290 cbm_node_free_fields(&node);
14291 return found;
14292}
14293
14294/* PR C1, end to end: C keeps one graph node per QN, so the right entity must win.
14295 * A header and its .c share the module QN (proj.s): `struct S s_global;` in s.c

Callers 2

test_pipeline.cFile · 0.85
c1_observe_variantsFunction · 0.85

Calls 2

cbm_node_free_fieldsFunction · 0.85

Tested by

no test coverage detected