feat(backends): storage backend plugins — pgvector, Qdrant, Redis, S3 (Step 1.1) - #40
Merged
Merged
Conversation
… (Step 1.1) New `rag-backends` workspace package with production-ready SPI implementations: - `PgVectorStore` — asyncpg + pgvector; ivfflat cosine index; `initialize()` DDL - `QdrantVectorStore` — single collection with payload-based tenant isolation; qdrant-client 1.18 `query_points` API - `RedisCache` — redis.asyncio; configurable key prefix + TTL - `S3Storage` — aioboto3; works with AWS S3 and MinIO (S3-compatible) - `LocalFileStorage` — aiofiles; path-traversal protected; no external deps Infrastructure: - MinIO added to docker-compose core profile (port 9000/9001; `rag-dev` + `rag-integration-test` buckets auto-created) - `task test-integration` / `make test-integration` for service-dependent tests - `task test-backends` / `make test-backends` for unit-level tests (no services) - Integration tests auto-skip gracefully if backend not reachable Quality: - 487 tests pass (32 integration tests skip without services) - mypy --strict clean; ruff clean; all checks pass - mypy overrides for asyncpg, pgvector, aiofiles, aioboto3, qdrant-client Docs: ADR-0004, docs/reference/backends.md, docs/architecture/storage-backends.md Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
officialCodeWork
pushed a commit
that referenced
this pull request
May 23, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
packages/backends/(rag-backends) workspace package with five production-ready SPI implementationsBackends delivered
PgVectorStoreVectorStoreawait store.initialize()QdrantVectorStoreVectorStoreawait store.initialize(dim)RedisCacheCacheS3StorageStorageLocalFileStorageStorageTest plan
task test-backends— LocalFileStorage unit tests (9 tests, no services needed)task test-integration— full suite against live stack (skip-if-not-reachable)ruff check .— cleanruff format --check .— cleanmypy packages/ apps/gateway/— clean (new mypy overrides for untyped 3rd-party libs)task devstack (run locally before merge)Documentation
docs/adr/ADR-0004-storage-backends.md— decisions: single package, MinIO, graceful skipdocs/reference/backends.md— full public usage reference for all 5 backendsdocs/architecture/storage-backends.md— architecture, tenant isolation, extension pointsdocs/README.md— updated indexKnown gap (tracked)
rag_core.types.Embeddingdoes not carrycorpus_id. Both VectorStore backends storecorpus_id = ""and skip corpus filtering until Phase 1.8 extends theEmbeddingtype (documented in ADR-0004).🤖 Generated with Claude Code