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

Function seed_test_file_nodes

tests/test_parallel.c:167–185  ·  view source on GitHub ↗

The compact parity helpers normally omit the production structure pass. * Tests that exercise graph-derived import maps must seed its File-node * precondition explicitly, without changing legacy parity fixtures. */

Source from the content-addressed store, hash-verified

165 * Tests that exercise graph-derived import maps must seed its File-node
166 * precondition explicitly, without changing legacy parity fixtures. */
167static void seed_test_file_nodes(cbm_gbuf_t *gbuf, const char *project,
168 const cbm_file_info_t *files, int file_count) {
169 if (!gbuf || !project || !files) {
170 return;
171 }
172 for (int i = 0; i < file_count; i++) {
173 const char *rel = files[i].rel_path;
174 if (!rel) {
175 continue;
176 }
177 char *file_qn = cbm_pipeline_fqn_compute(project, rel, "__file__");
178 const char *slash = strrchr(rel, '/');
179 const char *basename = slash ? slash + 1 : rel;
180 if (file_qn) {
181 cbm_gbuf_upsert_node(gbuf, "File", basename, file_qn, rel, 0, 0, "{}");
182 }
183 free(file_qn);
184 }
185}
186
187/* ── Run sequential pipeline on files, returning gbuf ─────────────── */
188

Calls 2

cbm_pipeline_fqn_computeFunction · 0.85
cbm_gbuf_upsert_nodeFunction · 0.85

Tested by

no test coverage detected