feat: identity memory source type — auto-capture when users express identity-significant feelings#106
Merged
Merged
Conversation
- Add 'identity' to valid source types in tool schemas and descriptions - Auto-detect identity-significant expressions (imposter feelings, pride, uncertainty) - Save as source=identity, importance=0.85, scope=global for durable recall - Tests: 5 test cases covering detection, false positives, dedup, and DB persistence
4 tasks
AxDSan
pushed a commit
that referenced
this pull request
May 13, 2026
PR #106 added tests/test_identity_memory.py whose fixture errors on every PR's CI matrix with two separate setup failures, blocking all five currently-open PRs (#98, #101, #102, #105, #107): 1. AttributeError: 'str' object has no attribute 'parent' The fixture does `BeamMemory(db_path=db_path)` where db_path is a string from tempfile. BeamMemory.__init__ stored it as-is, then _get_connection at beam.py:326 did `path.parent.mkdir(...)` -- strings don't have .parent. 2. AttributeError: 'BeamMemory' object has no attribute 'initialize' The fixture then calls `beam.initialize()`. BeamMemory has no such method; __init__ already opens the connection and runs init_beam() (schema setup, sleep_log, etc.). The .initialize() call must have been left over from a refactor where the test was rewritten to use BeamMemory directly instead of MnemosyneMemoryProvider (which DOES have an initialize()). Both bugs caused 5 ERROR records in CI, marking the run failed even though the actual test bodies are correct. Fixes: - mnemosyne/core/beam.py BeamMemory.__init__: coerce non-Path db_path via Path(db_path) before storage. Backward-compatible -- real Path inputs stay Path, strings get coerced, None still falls back to _default_db_path(). The implicit Path-only contract is now explicit and tolerant. - tests/test_identity_memory.py fixture: drop the spurious beam.initialize() call. __init__ already does the setup work. Regression test: tests/test_beam_db_path_string_coercion.py pins the db_path acceptance contract across str / Path / None inputs, plus an end-to-end smoke that exercises the .parent.mkdir(parents=True) path that the original AttributeError hit. Empirics: - 9/9 in the targeted slice (4 new coercion tests + 5 PR #106 identity tests now pass) - 143/143 in the broader slice across hermes_memory_provider/plugin_session/plugins/integration/ data_dir_scripts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
AxDSan
added a commit
that referenced
this pull request
May 13, 2026
…ercion fix: two bugs in PR #106's identity-memory test fixture blocking CI
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.
Closes #104
What
Adds
identityas a first-class memory source type in Mnemosyne. The auto-memory system now detects when a user expresses identity-significant feelings and saves them with high importance for durable recall.Why
The current auto-memory system only captures:
It has no awareness of emotional or identity-relevant conversations. When a user talks about feeling unsure about their work, questioning their expertise, or expressing pride in a feature they shipped — those are the most important things to remember, and Mnemosyne currently misses them all.
Changes
Tool schemas
REMEMBER_SCHEMAsource description now includesidentityAuto-capture in
sync_turn()New
_capture_identity_signals()method runs after every user turn. Detects identity-significant expressions via keyword matching:When a match is found, saves as:
source="identity"— new source typeimportance=0.85— high priority for recallscope="global"— survives session boundariesveracity="stated"— direct user assertionOnly one identity memory per turn (break after first match).
Tests
5 test cases in
tests/test_identity_memory.py:Impact