Commit d8874fa
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 6b57db2 commit d8874fa
2 files changed
Lines changed: 46 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 | + | |
| 862 | + | |
| 863 | + | |
853 | 864 | | |
854 | 865 | | |
855 | 866 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
950 | 950 | | |
951 | 951 | | |
952 | 952 | | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
953 | 985 | | |
954 | 986 | | |
955 | 987 | | |
| |||
2956 | 2988 | | |
2957 | 2989 | | |
2958 | 2990 | | |
| 2991 | + | |
2959 | 2992 | | |
2960 | 2993 | | |
2961 | 2994 | | |
| |||
0 commit comments