fix(analysis): report call-edge truncation

This commit is contained in:
morluto
2026-07-24 14:14:26 +00:00
parent 24b3dc41df
commit 6039b92be7
2 changed files with 9 additions and 2 deletions
+5 -1
View File
@@ -181,7 +181,11 @@ const recordEdge = (
const targetAddress =
input.direction === "forward" ? edge.relatedAddress : edge.address;
const edgeKey = `${sourceAddress}\u0000${targetAddress}`;
if (state.edges.has(edgeKey) || state.edges.size >= input.max_nodes) return;
if (state.edges.has(edgeKey)) return;
if (state.edges.size >= input.max_nodes) {
state.residual.add("Call-path traversal reached the edge limit.");
return;
}
state.edges.set(edgeKey, {
source_address: sourceAddress,
target_address: targetAddress,