Commit c032f23
authored
feat: add Qdrant vector storage integration (M9 Phase 1) (#63)
* feat: add Qdrant vector storage integration (M9 Phase 1)
Implements vector storage and similarity search via Qdrant for M9: Semantic Memory.
Core Changes:
- New QdrantStore module with store/search/has_embedding methods
- SQLite embeddings_metadata table with foreign key constraints
- PRAGMA foreign_keys enabled via SqliteConnectOptions
- Docker Compose Qdrant service on ports 6333/6334
Breaking Changes (pre-1.0):
- SqliteStore::save_message() returns Result<i64> for message_id
- QdrantStore::store() requires model parameter
- ENV_KEYS replaces LLM_ENV_KEYS constant
Tests:
- 12 new tests (3 unit + 2 integration + 1 CASCADE DELETE + 3 config)
- 98% coverage for new code
- All checks pass: fmt, clippy, nextest
Closes #60
* ci: allow thiserror 1.x/2.x duplicate for qdrant-client compat
* chore: update Qdrant Docker image to v1.16.3
* feat(test): add testcontainers for Qdrant integration tests
Add testcontainers-rs 0.27 for automated Qdrant container lifecycle in
integration tests. Replace ignored tests with testcontainers-powered
equivalents that run in CI.
Changes:
- Add testcontainers 0.27 workspace dependency (MIT/Apache-2.0, dev-only)
- Create crates/zeph-memory/tests/qdrant_integration.rs with:
- Custom GenericImage for qdrant/qdrant:v1.13.6
- setup_with_qdrant() helper with WaitFor::message_on_stdout
- 3 tests: ensure_collection_is_idempotent, store_and_search_vector,
search_with_conversation_filter
- Remove 2 #[ignore] tests from qdrant.rs (moved to integration tests)
- Add integration job to CI workflow (ubuntu-latest, Docker required)
- Document testcontainers usage in CONTRIBUTING.md
All 153 tests pass (6 skipped Ollama/Claude tests require external services).
* fix: correct import order and formatting in qdrant_integration.rs
* feat(test): add nextest profiles and fix CI test separation
Add nextest configuration to properly separate unit tests from integration
tests in CI. Fix macOS test failures by excluding testcontainers integration
tests from the main test job.
Changes:
- Create .config/nextest.toml with default and ci profiles
- Update CI test job to run only unit tests: --lib --bins (excludes tests/)
- Update CI integration job to use --profile ci for explicit inclusion
- Update CONTRIBUTING.md with nextest commands and test separation docs
Test separation:
- test job: Unit tests only (--lib --bins), runs on ubuntu + macos
- integration job: Integration tests with testcontainers, ubuntu-latest only
- coverage job: All tests for coverage metrics
Fixes: macOS test failures due to Docker socket not available
Error: SocketNotFoundError("/var/run/docker.sock")
Solution: Integration tests now run only in dedicated integration job1 parent a9d6385 commit c032f23
16 files changed
Lines changed: 1683 additions & 108 deletions
File tree
- .config
- .github/workflows
- config
- crates
- zeph-core/src
- zeph-memory
- migrations
- src
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
75 | 95 | | |
76 | 96 | | |
77 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
11 | 27 | | |
12 | 28 | | |
13 | 29 | | |
| |||
22 | 38 | | |
23 | 39 | | |
24 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
25 | 57 | | |
26 | 58 | | |
27 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
26 | 53 | | |
27 | 54 | | |
28 | 55 | | |
| |||
43 | 70 | | |
44 | 71 | | |
45 | 72 | | |
46 | | - | |
| 73 | + | |
47 | 74 | | |
48 | 75 | | |
49 | 76 | | |
50 | 77 | | |
51 | 78 | | |
52 | | - | |
| 79 | + | |
53 | 80 | | |
54 | | - | |
| 81 | + | |
55 | 82 | | |
56 | 83 | | |
57 | 84 | | |
| |||
64 | 91 | | |
65 | 92 | | |
66 | 93 | | |
67 | | - | |
| 94 | + | |
68 | 95 | | |
69 | 96 | | |
70 | 97 | | |
| |||
0 commit comments