Changes
Refactored
- Fix N+1 query in update_memories_batch — The batch update method issued a separate SELECT per memory to fetch `updated_at`; it now includes `updated_at` in the initial bulk SELECT, eliminating the N+1 query pattern and reducing database round-trips proportionally to batch size.
- Simplify _get_memory_age_days — Replaced explicit conditional logic with a concise `max(filter(None, ...))` expression, improving readability while preserving correct behaviour when either timestamp is absent.
- Extract _initialize_hash_embedding_fallback() helper — Duplicated hash-embedding fallback initialization logic has been consolidated into a single private helper method, eliminating code duplication and making the fallback path easier to maintain.
Details
- Commit: 5749c89
- Addresses Gemini Code Assist review feedback on PR #610
- No functional changes; pure code quality improvements
- 1,340 tests — no regressions
Full Changelog
See CHANGELOG.md for the complete version history.