From 977434ff367e87952755fa35b0b4012b47300cbb Mon Sep 17 00:00:00 2001 From: artboy <80608452+itxaiohanglover@users.noreply.github.com> Date: Mon, 22 Jun 2026 14:54:41 +0800 Subject: [PATCH] fix(flows): normalize changed_files to absolute paths for incremental flow detection git diff --name-only returns relative paths (e.g. 'src/main.py') but the graph stores absolute file_path values (e.g. '/home/user/repo/src/main.py'). The comparison ep.file_path in changed_file_set always failed, causing incremental_trace_flows to never find new entry points. Fix: normalize changed_files to absolute paths at the start of incremental_trace_flows. This fixes both the SQL query (line 473) and the set comparison (line 513). Fixes #569 --- code_review_graph/flows.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code_review_graph/flows.py b/code_review_graph/flows.py index fd12ade6..cd0077f6 100644 --- a/code_review_graph/flows.py +++ b/code_review_graph/flows.py @@ -459,6 +459,11 @@ def incremental_trace_flows( if not changed_files: return 0 + # Normalize to absolute paths — git diff returns relative paths but + # the graph stores absolute file_path values (see #569). + import os + changed_files = [os.path.abspath(f) for f in changed_files] + conn = store._conn changed_file_set = set(changed_files)