diff --git a/CHANGELOG.md b/CHANGELOG.md index a8cd7b37..2e142989 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,6 +60,8 @@ Status of the `main` branch. Changes prior to the next official version change w replaced by a regular file (#1958) * Memories: + - Fix: `move_memory` / rename only checked write access on the destination name, so a tool-context + rename could relocate a read-only memory; both source and destination are now checked - Fix: `save_memory`/`edit_memory` wrote directly to the memory file with `open(path, "w")`, which truncates it before the new content is written; a crash, OOM kill, or full disk partway through the write could destroy the previous, valid content instead of just losing the update. Both now diff --git a/src/serena/memories/memory_manager.py b/src/serena/memories/memory_manager.py index a112180e..f9e83385 100644 --- a/src/serena/memories/memory_manager.py +++ b/src/serena/memories/memory_manager.py @@ -330,6 +330,7 @@ class MemoryManager: new_name = self._sanitize_name(new_name) self._check_not_ignored(old_name) self._check_not_ignored(new_name) + self._check_write_access(old_name, is_tool_context) self._check_write_access(new_name, is_tool_context) old_path = self.get_memory_file_path(old_name)