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
CassandraVectorStore broken against real Cassandra 5.0 (list<float> not vector, no SAI index, score=1.0) — hidden by MagicMock #842
CassandraVectorStore's cassandra-driver path (src/synapsekit/retrieval/cassandra_vector.py), previously only MagicMock-tested, is broken against a real Cassandra 5.0. Found via a real cassandra:5 testcontainer (epic #829). (It does correctly offload via run_in_executor — async is fine here.)
Bugs (cassandra-driver mode, hidden by the mock)
Wrong column type — the embedding column is created as list<float>; Cassandra 5.0 ANN vector search requires vector<float, dim>.
No SAI index — ORDER BY embedding ANN OF ... requires a StorageAttachedIndex on the vector column; none is created, so every search fails (InvalidRequest).
Score hardcoded to 1.0 — _cass_search_sync returns score: 1.0 for every row instead of the real similarity.
No reconnect persistence — search() returns [] when not self._table_created and self._dim is None, so a reconnected instance never finds existing rows.
Fix
Create embedding vector<float, dim> plus a StorageAttachedIndex (cosine).
Return the real score via similarity_cosine(embedding, <vec>).
Drop the guard; _cass_search_sync returns [] on a missing-table InvalidRequest (covers search-before-add and reconnect).
Test
Real cassandra:5 testcontainer (cassandra-driver mode, address-translator for the mapped port): true nearest-neighbour ranking, metadata filter, top_k, reconnect persistence, empty/negative, async contract. Replaces the MagicMock test; runs in the CI integration job.
Activity
fix(retrieval): keep cassandra query-building unit tests driver-free (#…
fix(retrieval): keep cassandra query-building unit tests driver-free (#…
fix(retrieval): fix CassandraVectorStore against real Cassandra 5.0 (S…