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

Function closure_fresh_full

tests/test_pipeline.c:4613–4639  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

4611
4612/* Fresh full reference build of the same tree into its own DB. */
4613static void closure_fresh_full(const char *tmp, const char *db_path, int *out_nodes, int *out_edges,
4614 int *out_ref_edges, const char *project_hint) {
4615 *out_nodes = -1;
4616 *out_edges = -2;
4617 *out_ref_edges = -3;
4618 cbm_unlink(db_path);
4619 cbm_remove_db_sidecars(db_path);
4620 cbm_pipeline_t *full = cbm_pipeline_new(tmp, db_path, CBM_MODE_FULL);
4621 if (!full) {
4622 return;
4623 }
4624 int rc = cbm_pipeline_run(full);
4625 const char *project = cbm_pipeline_project_name(full);
4626 if (rc == 0) {
4627 cbm_store_t *store = cbm_store_open_path(db_path);
4628 if (store) {
4629 *out_nodes = cbm_store_count_nodes(store, project);
4630 *out_edges = cbm_store_count_edges(store, project);
4631 *out_ref_edges =
4632 named_edge_to_file_count(store, project, "CALL_REFERENCE", "closureProbeCaller",
4633 "closureProbeHelper", "lib.ts");
4634 cbm_store_close(store);
4635 }
4636 }
4637 (void)project_hint;
4638 cbm_pipeline_free(full);
4639}
4640
4641/* The manifest hash fans out across workers above a file-count threshold;
4642 * 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