Skip to content

feat: v0.4.0 — 10 enhancement features with 100% coverage#2

Merged
h4x0r merged 14 commits intomainfrom
feat/v0.4-enhancements
Mar 23, 2026
Merged

feat: v0.4.0 — 10 enhancement features with 100% coverage#2
h4x0r merged 14 commits intomainfrom
feat/v0.4-enhancements

Conversation

@h4x0r
Copy link
Copy Markdown
Collaborator

@h4x0r h4x0r commented Mar 23, 2026

Summary

  • Schema Migration Framework — versioned migrations via PRAGMA user_version with sequential upgrade support
  • Richer Query API — temporal filters, session scoping, exclude terms, and per-stage boost weights
  • Export/Backup API — JSON export/import for all 6 table types with duplicate-safe INSERT OR IGNORE
  • Streaming/Incremental Consolidationconsolidate_batch() with configurable window size
  • Embedded Vector Search (vec-sqlite feature) — KNN search via sqlite-vec virtual tables
  • Embedded Model Support (local-embeddings feature) — offline embeddings via fastembed/ONNX
  • Webhook/Callback HooksMemoryHooks trait with 5 lifecycle event callbacks
  • Memory Visualization MCP Tool — Mermaid diagram generation for the knowledge graph
  • Benchmark Harness — criterion benchmarks for store, query, consolidate, transform, forget, cosine
  • Conflict Resolution EngineCorroboration strategy resolving by corroboration count

Test plan

  • All unit tests pass (100% coverage — 2780/2780 lines)
  • All integration tests pass (8 test files, 80+ tests)
  • Benchmarks compile (cargo check --benches)
  • Feature-gated code compiles in isolation
  • Doc tests pass

🤖 Generated with Claude Code

h4x0r and others added 14 commits March 23, 2026 21:07
Replace ad-hoc column-existence checks with a proper MIGRATIONS array
and run_migrations() helper. Fresh databases get the full schema at
LATEST_VERSION (6); existing databases run only the migrations needed
to catch up. The v5->v6 migration is a no-op that establishes the
framework for future schema changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… weights to query API

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds an optional `vec-sqlite` feature that uses the sqlite-vec extension
for hardware-accelerated KNN vector search via a vec0 virtual table,
replacing brute-force cosine scan for episode embeddings at scale.

- New `vec_search` module with init, create_table, upsert, knn_search, delete
- Automatic upsert into vec0 table when storing episode embeddings
- Graceful fallback to brute-force when vec table is not initialised
- 5 feature-gated unit tests covering CRUD and similarity correctness

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…tembed

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a new `visualize` tool to the MCP server that generates Mermaid
graph diagrams showing episodes, semantic nodes, categories, preferences,
and their link connections. Supports configurable max_nodes and min_weight
parameters for controlling diagram complexity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Benchmarks: store_episode, query_bm25 (100/500/1000), consolidate,
transform, cosine_similarity (384d), and forget operations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a Corroboration variant to ConflictStrategy that resolves
conflicts by picking the node with the higher corroboration_count,
falling back to recency on ties.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Required by the memory_bench benchmark harness.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
10-task plan covering schema migration, richer queries, export,
consolidation, vec-sqlite, local-embeddings, hooks, MCP viz,
benchmarks, and conflict resolution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add targeted tests for all 59 previously uncovered lines:
- export.rs: full roundtrip with categories, links, and skip paths
- schema.rs: migration upgrade from older DB version (v4→v6)
- reconciliation.rs: corroboration tie with node_a newer
- mcp/mod.rs: visualize tool dispatch
- hooks.rs: consolidate_batch and auto_consolidate_batch hooks
- coverage_gaps.rs: admin export/import wrapper methods

Coverage: 2780/2780 lines (100.00%)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@h4x0r h4x0r merged commit e498577 into main Mar 23, 2026
11 of 13 checks passed
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.

1 participant