fix: add timestamps for DELETE operations in history#4492
Merged
kartik-mem0 merged 1 commit intomem0ai:mainfrom Mar 26, 2026
Merged
fix: add timestamps for DELETE operations in history#4492kartik-mem0 merged 1 commit intomem0ai:mainfrom
kartik-mem0 merged 1 commit intomem0ai:mainfrom
Conversation
Contributor
Author
|
@CLAassistant check |
1 similar comment
Contributor
Author
|
@CLAassistant check |
d663a80 to
180cf79
Compare
Contributor
Author
|
@CLAassistant check |
utkarsh240799
previously approved these changes
Mar 25, 2026
93d3258 to
5439d27
Compare
- Preserve original memory creation time in created_at field - Record deletion time in updated_at field - Apply fix to both sync and async versions - Add comprehensive test coverage for timestamp preservation Fixes mem0ai#4467
5439d27 to
0cd4b15
Compare
utkarsh240799
approved these changes
Mar 26, 2026
This was referenced Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4467
Description
This PR implements enhancement #4467 by adding proper timestamp handling for DELETE operations in memory history.
Problem: When memories are deleted, the original creation timestamp is lost because
created_atis overwritten with deletion time, making historical analysis impossible.Solution:
created_atfieldupdated_atfield_delete_memory) and async (_adelete_memory) versionsImpact:
Fixes #4467
Type of change
How Has This Been Tested?
Tested with the following scenario:
created_atis set correctlycreated_atis preserved,updated_atis updated to deletion timeExample test output:
Checklist:
Maintainer Checklist