Skip to content

fix(memory): deduplicate session summaries in Qdrant — multiple compactions create duplicate vectors #1917

@bug-ops

Description

@bug-ops

Problem

store_session_summary() uses uuid::Uuid::new_v4() as the Qdrant point ID (crates/zeph-memory/src/embedding_store.rs:286). Each compaction call generates a new random UUID, so multiple compactions for the same conversation accumulate duplicate summary vectors in zeph_session_summaries.

On a long session with multiple compaction cycles, search_session_summaries() returns all accumulated summaries, causing redundant context injection.

Expected behavior

Each conversation should have at most one current summary vector. Either:

  • Upsert by a stable deterministic ID (e.g. hash of conversation_id + session_start_timestamp)
  • Or delete the previous summary point before inserting the new one

Impact

Medium — data bloat in Qdrant, redundant cross-session context injection after long sessions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    memoryzeph-memory crate (SQLite)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions