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

Function create_data_flows

src/pipeline/pass_route_nodes.c:923–946  ·  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

921
922/* Phase 3: Create DATA_FLOWS edges by linking callers through Route to handlers. */
923static void create_data_flows(cbm_gbuf_t *gb) {
924 const cbm_gbuf_node_t **routes = NULL;
925 int route_count = 0;
926 if (cbm_gbuf_find_by_label(gb, "Route", &routes, &route_count) != 0 || route_count == 0) {
927 return;
928 }
929
930 int flows = 0;
931 int skipped = 0;
932
933 for (int ri = 0; ri < route_count; ri++) {
934 caller_edge_ref_t caller_edges[CBM_SZ_64];
935 int n_callers = collect_caller_edges(gb, routes[ri]->id, caller_edges, CBM_SZ_64);
936 create_route_data_flows(gb, routes[ri], caller_edges, n_callers, &flows, &skipped);
937 }
938
939 if (flows > 0 || skipped > 0) {
940 char buf1[CBM_SZ_16];
941 char buf2[CBM_SZ_16];
942 snprintf(buf1, sizeof(buf1), "%d", flows);
943 snprintf(buf2, sizeof(buf2), "%d", skipped);
944 cbm_log_info("pass.data_flows", "created", buf1, "skipped_has_call", buf2);
945 }
946}
947
948/* ── SvelteKit filesystem-based route extractor ──────────────────────
949 *

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