Skip to content

✨ Character Memory runs without a vector service: embedded Qdrant Edge becomes the default candidate store, held to the same contract as the service adapter - #78

Open
ebigunso wants to merge 3 commits into
impl/v0-1-6-w2-task3-record-contractfrom
impl/v0-1-6-w3-task4-embedded-store
Open

✨ Character Memory runs without a vector service: embedded Qdrant Edge becomes the default candidate store, held to the same contract as the service adapter#78
ebigunso wants to merge 3 commits into
impl/v0-1-6-w2-task3-record-contractfrom
impl/v0-1-6-w3-task4-embedded-store

Conversation

@ebigunso

@ebigunso ebigunso commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

v0.1.6 Wave 3, Task_4 (ADR-I-0023 embedded engine and default, ADR-I-0027 engine discipline, ADR-I-0024 verdict mapping), stacked on Task_3.

  • An embedded vector candidate store on qdrant-edge 0.8.0: one shard directory per collection under VECTOR_STORE_PATH, cosine at the configured size, the indexing threshold at its exact-scan setting, the five-field payload with keyword indexes on object id and object type, search through the shared tie-closure loop and canonical constructor with truthful verdict mapping.
  • Embedded is the default vector mode; service mode is explicit (VECTOR_STORE_MODE=service plus the connection string); a missing store path in embedded mode is a configuration error. The collection name is the backend-neutral namespace key, validated against the portable allowlist with path confinement.
  • Every engine call, including shard open and load with lock backoff, index creation, and the filtered scope count, runs on a dedicated blocking owner that opens the shard itself; a write is acknowledged only after the engine's flush; the facade drop only signals the owner.
  • A contract canary pins the engine facts: zero threshold means unindexed (proven on a populated, flushed shard), object-payload precondition, shard-directory precondition, crate-local types, no persistence before flush, no log replay on load, and the directory lock.
  • Port-conformance parity suite runs the embedded adapter unconditionally and the service adapter under the live gate, including the identical-vector tie fixture (exhaustive versus boundary-closed) and the zero-norm record and query cases through the shared fixture.
  • Restart, byte-identical reruns, vector-size and distance mismatch, unsupported schema-version marker, hard-exit durability, close-then-reopen, and responsiveness benchmark tests; README and phase document carry the dependency-weight report, latency guidance, single-process expectation, and rebuild path.

Validation

  • Worker (cm-worker): fmt; Clippy -D warnings; bare cargo test service-free and service-up; ignored Qdrant tests; benchmark 3/11/48 ms exhaustive scan at 100/1000/5000 records of 1536 dimensions; footprint delta 24.3 MB.
  • Reviewer (cm-reviewer, Tier D): approved at 01de5d0 with no findings after one revision (both-adapter zero-norm parity; populated-shard canary leg); bare toolchain 1.97 selected; service-up 431 passed / 0 failed / 5 ignored with every live-gated body exercised; ignored Qdrant library tests 5/5.
  • Rust 1.95 no longer builds the crate (engine requirement); the toolchain pin is 1.97.0 via the stack's rebase onto main.

🤖 Generated with Claude Code

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Public constructor documentation remains inaccurate for the new embedded default and mode-specific configuration.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Adds embedded Qdrant Edge as the default vector candidate store while retaining explicit service mode.

Changes:

  • Implements durable embedded vector storage with contract parity.
  • Adds backend mode/path configuration and routing.
  • Expands durability, compatibility, and performance tests.
  • Documents setup and operational guidance.
File summaries
File Description
tests/write_planning_tests.rs Makes service-backed fixtures explicit.
tests/vector_port_contract_tests.rs Adds cross-adapter contract tests.
tests/support/persistent.rs Keeps persistent fixtures in service mode.
tests/support/basic.rs Keeps basic fixtures in service mode.
tests/support/base.rs Loads vector configuration for tests.
src/errors.rs Adds embedded-engine error classifications.
src/config/app_settings.rs Adds vector mode/path settings; constructor rustdoc needs updating.
src/config.rs Exposes vector mode internally.
src/composition.rs Selects the vector backend; constructor rustdoc needs updating.
src/adapters/qdrant.rs Shares payload definitions with embedded mode.
src/adapters/qdrant_edge/mod.rs Implements the embedded candidate store.
src/adapters.rs Registers the embedded adapter.
README.md Documents vector modes and operations.
docs/design/roadmap-phases/v0_1_6_embedded_vector_candidate_recall.md Records measurements and implementation guidance.
Cargo.toml Adds Qdrant Edge 0.8.0.
Cargo.lock Locks the expanded dependency graph.
.env.example Documents embedded and service configuration.
Review details
  • Files reviewed: 16/17 changed files
  • Comments generated: 2
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/composition.rs
Comment thread src/config/app_settings.rs
@ebigunso ebigunso self-assigned this Sep 4, 2026
@ebigunso

ebigunso commented Sep 4, 2026

Copy link
Copy Markdown
Owner Author

The two constructor rustdoc threads are addressed in the closeout PR #79 on this stack (commit f91534f: facade constructor and Settings::new describe both vector-store modes); resolved here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants