[memory/RAG] Dead code: src/memory.py is a near-duplicate of services/memory/memory.py #746

Closed
opened 2026-06-03 00:17:46 +02:00 by sleepy · 0 comments
Owner

Legacy duplication: src/memory.py (365 lines) and services/memory/memory.py (359 lines) are nearly identical files containing the same MemoryManager class, tokenize(), and get_text_similarity().

Key differences:

  • src/memory.py has increment_uses() and uses field in _validate_entries / add_entry — these are present in the active services/memory/memory.py copy too
  • services/memory/memory.py is imported by services/memory/__init__.py and is the active module
  • src/memory.py appears to be the pre-refactor original that was copied into services/

Action: Verify src/memory.py has no active importers, then delete it. The same applies to src/memory_vector.py which is identical to services/memory/memory_vector.py (both 175 lines, same MemoryVectorStore class).

**Legacy duplication**: `src/memory.py` (365 lines) and `services/memory/memory.py` (359 lines) are nearly identical files containing the same `MemoryManager` class, `tokenize()`, and `get_text_similarity()`. **Key differences**: - `src/memory.py` has `increment_uses()` and `uses` field in `_validate_entries` / `add_entry` — these are present in the active `services/memory/memory.py` copy too - `services/memory/memory.py` is imported by `services/memory/__init__.py` and is the active module - `src/memory.py` appears to be the pre-refactor original that was copied into `services/` **Action**: Verify `src/memory.py` has no active importers, then delete it. The same applies to `src/memory_vector.py` which is identical to `services/memory/memory_vector.py` (both 175 lines, same `MemoryVectorStore` class).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sleepy/odysseus#746
No description provided.