mirror of
https://github.com/mruwnik/memory.git
synced 2026-01-02 17:22:58 +01:00
BUG-004: Score aggregation was broken - documents with more chunks would always rank higher regardless of relevance because scores were summed instead of averaged. Changes: - Changed score calculation from sum() to mean() - Added comprehensive tests for SearchResult.from_source_item() - Added tests for elide_content helper This ensures search results are ranked by actual relevance rather than by the number of chunks in the document. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>