Commit be31bd7
committed
fix(knowledge): re-index a file when an ancestor folder is renamed
Cursor Bugbot, medium severity. The hash already carried folderId so a move
re-indexes, but the resolved folderPath is what gets stored as the tag, and
renaming an ancestor folder rewrites that path while writing only the folder
table. contentUpdatedAt, originalName and folderId all stay put, so
classifyExternalDoc saw no change and the document kept the old folder tag
indefinitely.
folderPath now participates in the hash. Both listDocuments and getDocument
resolve it from the same pathById map, so the listing and hydration phases
still produce byte-identical hashes. Mutation-checked: dropping it from the
hash fails the new test.1 parent 176c84a commit be31bd7
2 files changed
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
130 | 141 | | |
131 | 142 | | |
132 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
189 | 195 | | |
190 | 196 | | |
191 | 197 | | |
| |||
201 | 207 | | |
202 | 208 | | |
203 | 209 | | |
204 | | - | |
| 210 | + | |
205 | 211 | | |
206 | 212 | | |
207 | 213 | | |
| |||
0 commit comments