From 276954bf24693801f94c474a163f983ab7c62e64 Mon Sep 17 00:00:00 2001 From: carlos-alm <127798846+carlos-alm@users.noreply.github.com> Date: Thu, 26 Mar 2026 16:09:04 -0600 Subject: [PATCH] fix(native): remove spurious else-if in Rust findCaller that misattributed 68 call edges MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Rust `build_call_edges` had an `else if` branch that assigned calls to the nearest preceding definition even when the call was outside that definition's span. This caused ~68 call edges to be silently dropped (caller == target → self-call filter) instead of correctly falling back to the file node as caller. The JS `findCaller` never had this branch. Closes #613 --- crates/codegraph-core/src/edge_builder.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/crates/codegraph-core/src/edge_builder.rs b/crates/codegraph-core/src/edge_builder.rs index b2e66251..68faba21 100644 --- a/crates/codegraph-core/src/edge_builder.rs +++ b/crates/codegraph-core/src/edge_builder.rs @@ -182,10 +182,6 @@ pub fn build_call_edges( caller_span = span; } } - } else if def.line <= call.line && caller_id == file_node_id { - if let Some(id) = def.node_id { - caller_id = id; - } } }