Skip to content

[Medium] memory-qdrant SCROLL_LIMIT truncates reads; a forgotten memory can be re-injected #357

Description

@gnanirahulnutakki

Summary

memory-qdrant scrolls with a fixed SCROLL_LIMIT = 16_384 and no pagination. For a subject/collection with more points than the cap, bi-temporal reads and the forgotten-chain GC silently truncate — and a tombstone past the cap can be dropped from the dead-set, letting a forgotten memory be re-injected into recall.

Evidence

  • crates/memory-qdrant/src/runtime.rs:50-52const SCROLL_LIMIT: u32 = 16_384; with a // TODO … paginate the scroll cursor note.
  • crates/memory-qdrant/src/runtime.rs:354-366scroll_records sets .limit(SCROLL_LIMIT) and reads only points.result; no next_page_offset cursor loop. Consumed by dead_chains (:385), at_time (:494), history_of (:505).

Impact

Scale-dependent correctness bug. Most damaging case: dead_chains misses a tombstone beyond 16,384 points → a memory the user forgot is re-surfaced in recall (a bypass of the forget guarantee).

Suggested fix

Paginate via Qdrant's next_page_offset cursor until exhausted; at minimum warn when a scroll returns exactly the cap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    auditFound by the 2026-07 Opus audit sweepbugSomething isn't workingcomp:memoryMemory / Qdrant backendseverity:mediumMedium severity

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions