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

Function pf_open

tests/test_pipeline_frozen.c:166–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164 return ok;
165}
166static bool pf_open(pf_fixture_t *f) {
167 memset(f, 0, sizeof(*f));
168 f->previous_global = cbm_get_user_lang_config();
169 const char *home = th_mktempdir("cbm-frozen-input");
170 if (!home || strlen(home) >= sizeof(f->home))
171 return false;
172 memcpy(f->home, home, strlen(home) + 1);
173 return pf_path(f->source, sizeof(f->source), home, "source") &&
174 pf_path(f->destination, sizeof(f->destination), home, "destination") &&
175 pf_path(f->db, sizeof(f->db), f->destination, "candidate.db") &&
176 pf_path(f->control, sizeof(f->control), home, "control.db") &&
177 pf_path(f->saved, sizeof(f->saved), home, "saved.db") &&
178 pf_path(f->config, sizeof(f->config), f->source, ".codebase-memory.json") &&
179 th_mkdir_p(f->source) == 0 && th_mkdir_p(f->destination) == 0 && pf_env_start(f);
180}
181static bool pf_role(const cbm_node_t *node, const char *role) {
182 if (!node->properties_json)
183 return false;

Callers 1

Calls 5

cbm_get_user_lang_configFunction · 0.85
th_mktempdirFunction · 0.85
pf_pathFunction · 0.85
th_mkdir_pFunction · 0.85
pf_env_startFunction · 0.85

Tested by

no test coverage detected