Fix memory consolidation race, whisper import, and chat sidebar sync#1160
Open
PaoloC68 wants to merge 3 commits intoagent0ai:developmentfrom
Open
Fix memory consolidation race, whisper import, and chat sidebar sync#1160PaoloC68 wants to merge 3 commits intoagent0ai:developmentfrom
PaoloC68 wants to merge 3 commits intoagent0ai:developmentfrom
Conversation
When _handle_update encounters a memory ID that was deleted by a concurrent consolidation task (fragments + solutions run in parallel on the same background event loop), the updated content was silently discarded via 'continue'. Now the insert always runs — only the delete is skipped when the original is already gone.
Every other chat mutation API (chat_create, chat_reset, chat_remove) calls mark_dirty_all() to push sidebar updates via WebSocket. chat_load was the only one missing it, causing loaded chats to not appear until full restart.
c8b0a1a to
7ac08d6
Compare
Author
|
Updated the PR description to reflect the file paths after the recent refactor (python/ → root, plugins/memory → plugins/_memory). The branch was already rebased onto current development — code is up to date, just the description was stale. Ready for review when you get a chance. |
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 #1163
Summary
Three independent bug fixes for stability:
mark_dirty_all(), so the sidebar list didn't refresh. Added the missing call.Changes
plugins/_memory/helpers/memory_consolidation.pyhelpers/whisper.pyapi/chat_load.pymark_dirty_all()call after chat loadTesting
Each fix addresses a specific production issue. Changes are minimal and isolated.