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

Function create_data_flows

src/pipeline/pass_route_nodes.c:891–914  ·  view source on GitHub ↗

Phase 3: Create DATA_FLOWS edges by linking callers through Route to handlers. */

Source from the content-addressed store, hash-verified

889
890/* Phase 3: Create DATA_FLOWS edges by linking callers through Route to handlers. */
891static void create_data_flows(cbm_gbuf_t *gb) {
892 const cbm_gbuf_node_t **routes = NULL;
893 int route_count = 0;
894 if (cbm_gbuf_find_by_label(gb, "Route", &routes, &route_count) != 0 || route_count == 0) {
895 return;
896 }
897
898 int flows = 0;
899 int skipped = 0;
900
901 for (int ri = 0; ri < route_count; ri++) {
902 caller_edge_ref_t caller_edges[CBM_SZ_64];
903 int n_callers = collect_caller_edges(gb, routes[ri]->id, caller_edges, CBM_SZ_64);
904 create_route_data_flows(gb, routes[ri], caller_edges, n_callers, &flows, &skipped);
905 }
906
907 if (flows > 0 || skipped > 0) {
908 char buf1[CBM_SZ_16];
909 char buf2[CBM_SZ_16];
910 snprintf(buf1, sizeof(buf1), "%d", flows);
911 snprintf(buf2, sizeof(buf2), "%d", skipped);
912 cbm_log_info("pass.data_flows", "created", buf1, "skipped_has_call", buf2);
913 }
914}
915
916/* ── SvelteKit filesystem-based route extractor ──────────────────────
917 *

Callers 1

Calls 3

cbm_gbuf_find_by_labelFunction · 0.85
collect_caller_edgesFunction · 0.85
create_route_data_flowsFunction · 0.85

Tested by

no test coverage detected