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
{{ message }}
Repository navigation
QdrantVectorStore: blocks event loop, ignores metadata_filter, id-collision on reconnect, deprecated API — hidden by MagicMock #836
QdrantVectorStore (src/synapsekit/retrieval/qdrant.py), previously only MagicMock-tested, has several real bugs found via a real qdrant/qdrant testcontainer (epic #829).
Bugs
Blocks the event loop (async violation) — add/search call the synchronous QdrantClient (get_collection, create_collection, upsert, search) directly inside async def, with no run_in_executor/to_thread. This stalls the event loop; SynapseKit is async-first and every other store offloads blocking IO.
metadata_filter silently ignored — search() accepts metadata_filter but never applies it, so filtered searches return unfiltered results.
ID collision / overwrite on reconnect — point ids come from a per-instance self._count starting at 0, so a fresh instance (or a second writer) re-adds ids 0,1,2… and overwrites existing points instead of appending.
search before add raises — a missing collection raises instead of returning [] (all other stores return []).
Deprecated .search() API — replaced by query_points in qdrant-client ≥1.10.
No len(metadata) == len(texts) validation (other stores raise ValueError).
Fix
Offload all client calls via asyncio.to_thread(...), preserving async.
Apply a native qdrant Filter/FieldCondition/MatchValue for metadata_filter.
Use uuid4 point ids (no collision, safe reconnect/append).
Return [] when the collection doesn't exist; use collection_exists + query_points.
Validate metadata length.
Test
Real qdrant/qdrant testcontainer: true nearest-neighbour ranking, metadata filter, top_k, persistence across reconnect (append, not overwrite), empty/negative, and an async-contract assertion. Replaces the MagicMock test; runs in the CI integration job.
Activity
fix(retrieval): fix QdrantVectorStore against a real Qdrant (SynapseK…