Commit Graph
4 Commits
Author SHA1 Message Date
Story Crater Bot ff28eac91f feat(M3.3): Implement mem query CLI command with reranking
Adds semantic search with vector recall + reranking + provenance walking:

Changes to crates/mem-cli/src/main.rs:
  - Add Query command variant with flags: --project, --levels, --k, --format, --explain
  - Add cmd_query handler: embed → recall → rerank → format output
  - Support both text and JSON output formats

Changes to crates/mem-cli/src/query_worker.rs:
  - Implement reranking in QueryWorker::query()
  - Recall 10×k candidates (capped at 50), rerank to top-k
  - Fall back to vector similarity if reranker fails
  - Handle reranker index mapping correctly (bare array format)

Changes to crates/mem-store/src/pgvector.rs:
  - Add pool() method for test access to connection pool

New file: tests/it_query.rs
  - 8 integration tests (6 ignored, require live DB + gateway):
    a1_known_answer: query returns correct L1 node first
    a2_provenance_resolves: every hit's parents exist in DB
    a3_default_excludes_l0: default output has no L0
    a4_levels_flag: --levels L0 returns evidence
    a5_rerank_reorders: pre/post rerank order differs
    a6_project_isolation: no cross-project hits
    a7_no_project_errors: bad project returns empty
    a8_l2_two_hop_provenance: L2→L1→L0 chain resolves
  - Seeded test DB fixture with L0/L1/L2 nodes

Pipeline:
  embed question → HNSW recall (10×k, cap 50) → rerank → top-k → render

Blocked on: M3.2 ( done), M2.1 ( done), M2.4 ( done)
2026-08-25 12:13:21 -07:00
rock e6e39cf6fd feat(core): implement full memory pipeline (#11)
Build and Push / Test (push) Failing after 2m37s
Build and Push / Build and push image (push) Skipped
2026-08-24 01:37:16 +00:00
Story Crater Bot d3be7f6fd4 Deploy Poimen Memory K8s cluster with ArgoCD tracking (M2.2, M3.5-M3.7)
ci / markdown (push) Waiting to run
2026-08-22 23:13:42 -07:00
Story Crater Bot 631cbfa3e9 feat: complete M0.1-M0.4 phases
M0.1 - Cargo workspace + crate skeletons
  - 6-crate workspace with correct dependency direction
  - CI/CD pipeline with GitHub Actions
  - Integration tests verifying build and dependency structure

M0.2 - Domain types and sha256 identity
  - Level (L0, L1, L2) enum with proper serde formatting
  - Role enum (User, Assistant, ToolResult, System)
  - Record, Chunk, and MemoryNode domain types
  - Content-hash identity system ensuring rebuild idempotence
  - Newtypes (ProjectId, QueryId, RunId) with validation
  - Round-trip serde tests for all types

M0.3 - RecordSource trait + ChunkPolicy
  - RecordSource trait for streaming record sources
  - Chunk policy with token budgets and boundary modes
  - TokenCounter trait with CharsOverFourCounter stub
  - Chunking stream that respects budgets without splitting records
  - VecSource for testing
  - Integration tests verifying lossless chunking and budget adherence

M0.4 - Tokenizer-backed chunk sizing
  - Vendored Qwen2 tokenizer with hash verification
  - QwenTokenCounter implementing proper token counting
  - Hash guard that fails on modified tokenizer
  - mem tokens CLI subcommand for token counting
  - Integration tests with known string counts, hash guards, and budget verification

Total: 19 integration tests passing, all phases verified to compose correctly
Workspace builds cleanly with no clippy warnings
2026-08-22 23:13:42 -07:00