Commit e6e38d6
committed
fix(memory): persist contradictedBy through vector-store upsert
The in-memory mutation in ConsolidationPipeline.resolveConflicts was
already populating provenance.contradictedBy and provenance.lastVerifiedAt
on both winner and loser before soft-deleting the loser, but the changes
lived only in the cache and were lost on process restart.
New MemoryStore.persistTraceMetadata(traceId) re-upserts the trace's
metadata to the vector store using the cached embedding, so the audit
trail survives without paying for a re-embedding pass. resolveConflicts
calls this for both sides before the softDelete write so a future load
of either trace sees the contradiction relationship that resolved the
conflict in the original session.1 parent adc2983 commit e6e38d6
2 files changed
Lines changed: 38 additions & 0 deletions
File tree
- src/cognition/memory
- pipeline/consolidation
- retrieval/store
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
435 | 441 | | |
436 | 442 | | |
437 | 443 | | |
| |||
440 | 446 | | |
441 | 447 | | |
442 | 448 | | |
| 449 | + | |
| 450 | + | |
443 | 451 | | |
444 | 452 | | |
445 | 453 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
671 | 671 | | |
672 | 672 | | |
673 | 673 | | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
674 | 704 | | |
675 | 705 | | |
676 | 706 | | |
| |||
0 commit comments