Skip to content

Comments

feat(memory): extract VectorStore trait abstraction#554

Merged
bug-ops merged 3 commits intomainfrom
feat/m28/vectorstore-trait
Feb 18, 2026
Merged

feat(memory): extract VectorStore trait abstraction#554
bug-ops merged 3 commits intomainfrom
feat/m28/vectorstore-trait

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 18, 2026

Summary

  • Extract backend-agnostic VectorStore trait with 7 async methods and VectorStoreError enum
  • Implement VectorStore for QdrantOps with type conversions
  • Add InMemoryVectorStore (brute-force cosine similarity) behind mock feature for unit testing
  • Refactor QdrantStore and SemanticMemory to use Box<dyn VectorStore> for dependency injection

Test plan

  • All 1625 workspace tests pass (0 failures)
  • 10 new InMemoryVectorStore tests pass with --features mock
  • clippy clean, fmt clean
  • Performance review: no blocking issues (abstraction overhead < 1% vs I/O)
  • Security audit: no unsafe code, no info leakage, correct RwLock usage

Closes #462,Closes #463,Closes #464,Closes #465
Relates to #476

@github-actions github-actions bot added memory Persistence and memory rust dependencies enhancement New feature or request size/XL labels Feb 18, 2026
@bug-ops bug-ops linked an issue Feb 18, 2026 that may be closed by this pull request
4 tasks
Introduce a backend-agnostic VectorStore trait with 7 async methods
(ensure_collection, upsert, search, delete_by_ids, scroll_all,
collection_exists, delete_collection) and implement it for QdrantOps.

Add InMemoryVectorStore behind `mock` feature for unit testing without
Qdrant. Refactor QdrantStore and SemanticMemory to use
Box<dyn VectorStore> for dependency injection.

Closes #462, #463, #464, #465
Relates to #476
@bug-ops bug-ops force-pushed the feat/m28/vectorstore-trait branch from 0d19c43 to cd760d5 Compare February 18, 2026 17:43
@bug-ops bug-ops enabled auto-merge (squash) February 18, 2026 17:45
@bug-ops bug-ops disabled auto-merge February 18, 2026 17:51
The struct now holds Box<dyn VectorStore> and is no longer
Qdrant-specific. Rename qdrant.rs to embedding_store.rs and
QdrantStore to EmbeddingStore to reflect the abstraction layer.
@bug-ops bug-ops merged commit 74dfbf2 into main Feb 18, 2026
18 checks passed
@bug-ops bug-ops deleted the feat/m28/vectorstore-trait branch February 18, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies enhancement New feature or request memory Persistence and memory rust size/XL

Projects

None yet

1 participant