-
Notifications
You must be signed in to change notification settings - Fork 3
fix: address mem0 deep review issues from PR #59 #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
8414262
feat: integrate mem0 for persistent user memory across conversations
BillChirico ed3d7d4
feat: rewrite mem0 integration to use official SDK with graph memory
BillChirico a6c8d61
fix: use splitMessage utility, IDs from search, and parallel deletion…
BillChirico 6cfa0d9
fix: add auto-recovery for transient mem0 failures
BillChirico c121d84
fix: verify SDK connectivity in health check instead of just client c…
BillChirico 6428dbe
docs: add privacy notice for external memory storage
BillChirico b86f9e1
chore: remove unused extractModel config and document addMemory publi…
BillChirico 54c41bd
style: fix Biome formatting in memory module
BillChirico 9b91987
feat: add memory command security features
BillChirico a654ce8
refactor: persist opt-out state to PostgreSQL instead of JSON file
BillChirico c370c90
fix: call loadOptOuts() on startup to restore opt-out state from DB
BillChirico 70d5476
fix: default memory to disabled when config fails to load
BillChirico 5e34d1d
fix: add markUnavailable() in delete function error handlers
BillChirico 6e98fdf
refactor: extract shared truncation logic into formatMemoryList helper
BillChirico f6df973
fix: rename test and update expected fallback config values
BillChirico 76991ec
fix: properly await addMemory promise in auto-recovery test
BillChirico 9823981
fix: classify transient vs permanent errors in memory module
BillChirico e6a6b3a
docs: add JSDoc explaining asymmetric _setMem0Available behavior
BillChirico 10ed123
fix: move vi.useRealTimers() to afterEach to prevent timer leaks
BillChirico ff12805
fix: use explicit mock for health check connectivity test
BillChirico f30c904
fix: use explicit null/undefined/empty check for memory IDs in handle…
BillChirico 3505b51
fix: guard formatRelations against missing source/relationship/target
BillChirico 7d5cffa
fix: add 5s timeout to buildMemoryContext in generateResponse
BillChirico 7344ec5
fix: don't call markUnavailable from fire-and-forget extractAndStoreM…
BillChirico 95c21a8
fix: add 10s timeout to checkMem0Health during startup
BillChirico 9cf095d
refactor: split isMemoryAvailable into pure getter + checkAndRecoverM…
BillChirico 23e61ab
fix: loop to delete all matching memories in /memory forget topic
BillChirico 6c46275
fix: add 2000-char budget for memory context in system prompt
BillChirico a3c9abc
fix: pass username as metadata instead of baking into memory content
BillChirico e99ff9c
chore: fix biome formatting
BillChirico 51016c9
fix: use nullish coalescing for memory ID mapping
BillChirico 9a69769
fix: call markUnavailable() on health check timeout to enable auto-re…
BillChirico ab04cc6
fix: prevent late health check from overriding markUnavailable via Ab…
BillChirico File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Filter null/undefined checks are dead code after upstream coercion
Low Severity
The
handleForgetTopicfilter checksm.id !== undefined && m.id !== nullbut these conditions can never trigger becausesearchMemoriesalready coercesnull/undefinedIDs to''viam.id ?? ''. The effective filter is justm.id !== ''. This makes the fix for falsy ID handling (fix #1) appear more robust than it actually is — the null/undefined guards are dead code. EithersearchMemoriesshould stop coercing IDs (usem.iddirectly) to let the downstream filter handle all cases, or the filter should be simplified to match whatsearchMemoriesactually produces.Additional Locations (1)
src/modules/memory.js#L363-L365