Repository navigation
fix(pipeline): DATA_FLOWS link every caller and handler of a route - #2689
Merged
Merged
Conversation
create_data_flows copied a route's callers (HTTP_CALLS + ASYNC_CALLS) into a 64-slot buffer and its INFRA_MAPS handlers into a 32-slot one, each keeping the first entries in edge-insertion order. In a parallel index that order is worker interleaving, so which DATA_FLOWS existed changed between two indexes of the same tree with the same binary (thingsboard, 2026-10-17), and every caller past the 64th lost its flow outright. The pass now walks the graph buffer's own edge arrays and creates the full caller x handler product per route. A (caller, handler) pair that is reached twice keeps cbm_gbuf_insert_edge's order-free property winner, so the flow set and its properties no longer depend on the order edges were inserted in. Signed-off-by: Martin Vogel <[email protected]>
Signed-off-by: Martin Vogel <[email protected]>
…route A route with 70 callers must link all 70 to its handler, a route whose INFRA_MAPS endpoint has 40 handlers must link its caller to all 40, and the flow set must not change when the callers' HTTP_CALLS edges are inserted in reverse order. Before the fix the first 64 callers and the first 32 infra handlers in insertion order were kept, so all three fail. Signed-off-by: Martin Vogel <[email protected]>
This was referenced Oct 19, 2026
DeusData
added a commit
to woodsonl/codebase-memory-mcp
that referenced
this pull request
Oct 19, 2026
… R2) Design decision 2026-10-18 (R1 + R2): a handler defined in a test file pairs only with callers in that same file, and a caller in a test file pairs only with handlers in that same file. A test's request to the application, a production caller matched to a test's mock server, and the private mock servers of two tests pairing across files are not data flows of the application. DeusData#2689 links every caller of a route to every handler of it, so these pairs were made on main. try_create_data_flow now refuses a pair whose caller or handler is in a test file (cbm_is_test_file, the per-language rule extraction uses) when the two files differ. HTTP_CALLS and HANDLES are unchanged; only the pairing is scoped. The pass log counts the refused pairs (skipped_test_scope). Signed-off-by: Martin Vogel <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(pipeline): DATA_FLOWS link every caller and handler of a route
create_data_flowscopied each route's callers (HTTP_CALLS + ASYNC_CALLS) into a 64-slot buffer and itsINFRA_MAPS handlers into a 32-slot one. Each buffer kept the first entries in edge-insertion order, which on the
parallel resolver is worker interleaving. That had two consequences:
graph content.
Change
The pass now walks the graph buffer's own edge arrays and creates the full caller x handler product for each
route.
cbm_gbuf_insert_edge's order-free property winner.INFRA_MAPS, HTTP_CALLS or ASYNC_CALLS array, and only edge deletion rebuilds the indexes.
Tests (infrascan suite)
infrascan_data_flows_link_every_caller_of_a_routeinfrascan_data_flows_reach_every_infra_handlerinfrascan_data_flows_do_not_depend_on_caller_insertion_orderWithout the fix (main plus these tests): all three fail on their behaviour assertions, at
test_infrascan.c:423, :442 and :474; infrascan is 7 passed, 3 failed.
With the fix:
pipeline+infrascanpass completely, 374 passed.Corpus check
The six repositories whose baseline runs were not identical from run to run, each indexed twice, on main
(354ccec) and with this change:
No other edge type moves beyond run-to-run noise. spark (IMPORTS) and swift-package-manager (CALLS,
IMPORTS, USAGE) differ between two runs on main and with this change alike. That nondeterminism is unrelated
to DATA_FLOWS.
Sequential and parallel resolvers. On thingsboard the sequential resolver has 0 DATA_FLOWS against 478.
The cause is upstream: on main only the parallel resolver runs the arg-URL heuristic (2 vs 2,101
HTTP_CALLS). This pass is the same code on both resolvers, and both are deterministic.
Skipped local legs
platform-neutral C in one pass.