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

Function closure_fresh_full

tests/test_pipeline.c:2343–2369  ·  view source on GitHub ↗

Fresh full reference build of the same tree into its own DB. */

Source from the content-addressed store, hash-verified

2341
2342/* Fresh full reference build of the same tree into its own DB. */
2343static void closure_fresh_full(const char *tmp, const char *db_path, int *out_nodes,
2344 int *out_edges, int *out_ref_edges, const char *project_hint) {
2345 *out_nodes = -1;
2346 *out_edges = -2;
2347 *out_ref_edges = -3;
2348 cbm_unlink(db_path);
2349 cbm_remove_db_sidecars(db_path);
2350 cbm_pipeline_t *full = cbm_pipeline_new(tmp, db_path, CBM_MODE_FULL);
2351 if (!full) {
2352 return;
2353 }
2354 int rc = cbm_pipeline_run(full);
2355 const char *project = cbm_pipeline_project_name(full);
2356 if (rc == 0) {
2357 cbm_store_t *store = cbm_store_open_path(db_path);
2358 if (store) {
2359 *out_nodes = cbm_store_count_nodes(store, project);
2360 *out_edges = cbm_store_count_edges(store, project);
2361 *out_ref_edges = named_edge_to_file_count(store, project, "CALL_REFERENCE",
2362 "closureProbeCaller", "closureProbeHelper",
2363 "lib.ts");
2364 cbm_store_close(store);
2365 }
2366 }
2367 (void)project_hint;
2368 cbm_pipeline_free(full);
2369}
2370
2371/* The manifest hash fans out across workers above a file-count threshold;
2372 * below it the serial path runs. Byte-identity of the parallel build is

Callers 1

test_pipeline.cFile · 0.85

Calls 11

cbm_unlinkFunction · 0.85
cbm_remove_db_sidecarsFunction · 0.85
cbm_pipeline_newFunction · 0.85
cbm_pipeline_runFunction · 0.85
cbm_store_open_pathFunction · 0.85
cbm_store_count_nodesFunction · 0.85
cbm_store_count_edgesFunction · 0.85
named_edge_to_file_countFunction · 0.85
cbm_store_closeFunction · 0.85
cbm_pipeline_freeFunction · 0.85

Tested by

no test coverage detected