Repository navigation
Commit 2833ef5
Tommy Corbett
fix(incremental): name File nodes by basename, matching the full pipeline
The incremental path passed changed_files[i].rel_path as the File node NAME,
while the full pipeline names File nodes by basename (pipeline.c "Create File
node"). Node upserts match by qualified name, so an incremental re-index of a
touched file RENAMED its File node in place ("applications.py" ->
"fastapi/applications.py"). File nodes are USAGE-edge sources, so:
- the same tree yields different graphs depending on whether it was indexed
fresh or incrementally, and the divergence grows as files are edited
(add AND modify both rename);
- name-based traversal dead-ends at any touched file's node (e.g. walking
inbound USAGE transitively misses everything that reaches a target through
a recently added/modified class).
Mirror the full pipeline's node shape at the incremental call site: basename
as the name, and the same {"extension": ...} props (previously "{}").
Adds incr_file_node_name_stays_basename to the incremental suite: modify a
file, incremental re-index, then assert no File node name contains '/'.
Red without the fix, green with it; full incremental suite 162/162.
Signed-off-by: Tommy Corbett <spde89@gmail.com>1 parent 8c9ac98 commit 2833ef5
2 files changed
Lines changed: 42 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
848 | 848 | | |
849 | 849 | | |
850 | 850 | | |
851 | | - | |
852 | | - | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
853 | 862 | | |
854 | 863 | | |
855 | 864 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
964 | 964 | | |
965 | 965 | | |
966 | 966 | | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
967 | 997 | | |
968 | 998 | | |
969 | 999 | | |
| |||
2970 | 3000 | | |
2971 | 3001 | | |
2972 | 3002 | | |
| 3003 | + | |
2973 | 3004 | | |
2974 | 3005 | | |
2975 | 3006 | | |
| |||
0 commit comments