Commit b265c57
fix: address review feedback on stale embedding stats
1. Remove unused valid_entity_ids parameter from _purge_stale_search_rows
2. Add entity_exists filter to total_embeddings and orphaned_chunks
queries for consistency (previously only applied to 3 of 5 queries)
3. Strengthen test assertion to exact match instead of <=
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: phernandez <paul@basicmachines.co>1 parent 6bf5343 commit b265c57
3 files changed
Lines changed: 21 additions & 11 deletions
File tree
- src/basic_memory/services
- tests/services
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1000 | 1000 | | |
1001 | 1001 | | |
1002 | 1002 | | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
1003 | 1007 | | |
1004 | 1008 | | |
1005 | 1009 | | |
| |||
1034 | 1038 | | |
1035 | 1039 | | |
1036 | 1040 | | |
1037 | | - | |
| 1041 | + | |
1038 | 1042 | | |
1039 | 1043 | | |
1040 | 1044 | | |
1041 | 1045 | | |
1042 | 1046 | | |
1043 | | - | |
| 1047 | + | |
1044 | 1048 | | |
1045 | 1049 | | |
1046 | 1050 | | |
| |||
1053 | 1057 | | |
1054 | 1058 | | |
1055 | 1059 | | |
1056 | | - | |
| 1060 | + | |
1057 | 1061 | | |
1058 | 1062 | | |
1059 | 1063 | | |
1060 | 1064 | | |
1061 | 1065 | | |
1062 | | - | |
| 1066 | + | |
1063 | 1067 | | |
1064 | 1068 | | |
1065 | 1069 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
| 409 | + | |
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
427 | | - | |
| 427 | + | |
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
286 | | - | |
287 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
288 | 293 | | |
289 | 294 | | |
290 | | - | |
| 295 | + | |
291 | 296 | | |
292 | | - | |
| 297 | + | |
| 298 | + | |
293 | 299 | | |
294 | 300 | | |
295 | 301 | | |
| |||
0 commit comments