Skip to content

Feature/global memories#1091

Merged
MischaPanch merged 22 commits intomainfrom
feature/global-memories
Mar 3, 2026
Merged

Feature/global memories#1091
MischaPanch merged 22 commits intomainfrom
feature/global-memories

Conversation

@MischaPanch
Copy link
Contributor

@MischaPanch MischaPanch commented Feb 26, 2026

Resolves #1006

butterflysky-ai and others added 7 commits February 23, 2026 18:52
The test wrote two values to a file and relied on a 3-second sleep for
the filesystem mtime to advance, which fails when both writes land in
the same second (ext4/tmpfs have 1-second mtime granularity).

Fix: use os.utime() to explicitly bump mtime after the second write.
This is deterministic, instant, and tests the actual cache invalidation
logic (mtime comparison) rather than hoping the clock advances.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement cross-project memories using "global/" as a reserved topic
name that routes to ~/.serena/memories/global/. This replaces the
previous scope-parameter approach with a simpler naming convention
that leverages the existing topic/directory grouping from #1058.

Key changes:
- MemoriesManager routes "global/*" names to ~/.serena/memories/global/
- edit_global_memories config option (default: true) protects globals
- All memory tools support "global/" prefix transparently
- Onboarding check filters global memories (they don't mean project
  is onboarded)
- Dashboard save/delete respect edit_global_memories guard

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract repeated directory-enumeration logic into a _collect helper.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@MischaPanch MischaPanch requested a review from opcode81 February 26, 2026 12:15
@MischaPanch
Copy link
Contributor Author

@butterflysky I don't have write permissions to your fork, so I created a new branch building from yours. FYI

@MischaPanch
Copy link
Contributor Author

@opcode81 memory renaming now possible in dashboard
image
image

I had to add an abstract apply to Tool b/c I introduced intermediate abstract subclasses of Tool that should never be included in the toolset. I adjusted the iter_subclasses util for that, relying on inspect.isabstract. The latter only works when there actually is an abstract method

MischaPanch and others added 5 commits February 26, 2026 23:03
Removed unnecessary intermediate abstract classes
…icate mechanism

Apply check for concrete class implementing 'apply' in ToolRegistry

Remove obsolete method for enumerating memory tools
@opcode81 opcode81 force-pushed the feature/global-memories branch from 806fcea to 1c71764 Compare February 26, 2026 22:07
Fix unhandled error case in list_memories
@opcode81
Copy link
Contributor

I will make some additional improvements before I merge this.

@opcode81 opcode81 force-pushed the feature/global-memories branch 2 times, most recently from 4c00caa to 8ec6f0a Compare February 27, 2026 18:38
@opcode81 opcode81 force-pushed the feature/global-memories branch from 8ec6f0a to 44136cf Compare February 27, 2026 18:44
@opcode81 opcode81 force-pushed the feature/global-memories branch from 7ca09cd to d26a4a9 Compare February 27, 2026 19:09
* Improve tool/param descriptions
* Remove obsolete tests
* Revert mypy config change
@opcode81 opcode81 force-pushed the feature/global-memories branch from d2d105f to 57eec27 Compare February 28, 2026 23:04
opcode81 and others added 2 commits March 2, 2026 19:47
Conflicts:
	src/serena/agent.py
	src/serena/config/serena_config.py
@MischaPanch MischaPanch merged commit ccbd150 into main Mar 3, 2026
3 of 4 checks passed
antigenius0910 added a commit to antigenius0910/serena that referenced this pull request Mar 3, 2026
Picks up FSharp/dotnet handling fixes from oraios#1115 and global
memories feature from oraios#1091.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add global (cross-project) memories

3 participants