Commit 6b1dfca
committed
fix: keep preserved duplicate paths idempotent
Keep the stored-hash duplicate check active when preserve_duplicate_paths is enabled so adding the same path/content tuple twice remains a no-op instead of hitting the unique path constraint.
Different paths with identical content still receive path-scoped hashes and remain preserved. Added a regression test for repeating memory_add_content('path/api4.md', '') with preserve_duplicate_paths=1.1 parent 5dd04fc commit 6b1dfca
2 files changed
Lines changed: 26 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2713 | 2713 | | |
2714 | 2714 | | |
2715 | 2715 | | |
2716 | | - | |
| 2716 | + | |
2717 | 2717 | | |
2718 | 2718 | | |
2719 | 2719 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3537 | 3537 | | |
3538 | 3538 | | |
3539 | 3539 | | |
| 3540 | + | |
| 3541 | + | |
| 3542 | + | |
| 3543 | + | |
| 3544 | + | |
| 3545 | + | |
| 3546 | + | |
| 3547 | + | |
| 3548 | + | |
| 3549 | + | |
| 3550 | + | |
| 3551 | + | |
| 3552 | + | |
| 3553 | + | |
| 3554 | + | |
| 3555 | + | |
| 3556 | + | |
| 3557 | + | |
| 3558 | + | |
| 3559 | + | |
| 3560 | + | |
| 3561 | + | |
| 3562 | + | |
| 3563 | + | |
3540 | 3564 | | |
3541 | 3565 | | |
3542 | 3566 | | |
| |||
4815 | 4839 | | |
4816 | 4840 | | |
4817 | 4841 | | |
| 4842 | + | |
4818 | 4843 | | |
4819 | 4844 | | |
4820 | 4845 | | |
| |||
0 commit comments