You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes issue #31 where hash-based deduplication reported finding N groups
but merged 0 memories, causing confusing logs.
**Root Cause:**
- FT.AGGREGATE query was executed as a single string via execute_command()
- This bypassed the FILTER "@count>1" clause, returning all groups including
unique memories (count=1)
- Processing logic correctly skipped count<=1 groups, resulting in 0 merges
**Solution:**
- Change FT.AGGREGATE execution from single string to individual arguments
- Use execute_command(*agg_query) instead of execute_command(agg_query)
- This ensures the FILTER clause properly excludes unique memories
- Added clearer logging messages
**Testing:**
- All existing tests pass
- Verified fix with integration test showing:
- 5 memories (2 duplicates + 3 unique) → 4 memories (1 duplicate removed)
- Proper logging: "Found 1 groups with hash-based duplicates to process"
- Correctly removes duplicate while preserving unique memories
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
0 commit comments