Commit Graph
52 Commits
Author SHA1 Message Date
Story Crater Bot 764bbf3452 feat(M3.4): Implement composition gate for M3 (L2 + rerank + query)
Adds gate verification that M3.1 (L2 synthesis) + M3.2 (rerank) + M3.3 (query) work together:

Files added:
  verify/known-answers.yaml
    - 3 known-answer questions from real infrastructure findings
    - Expected node texts and source substrings
    - Gate thresholds: hit_rate ≥ 0.8, precision ≥ 0.9

  verify/m3.4.sh (executable)
    - Runs known-answer questions through mem query
    - Measures hit rate at k=5
    - Verifies provenance precision (90%+ of citations contain facts)
    - Checks mem verify for level consistency
    - Checks L2→L1→L0 edge resolution
    - Exit 0 if all thresholds met, 1 if any fail

  tests/it_m3_gate.rs
    - 8 integration tests, 6 marked #[ignore] (need live DB)
    - a1-a2: Known-answer Kong buffer / auth header
    - a3: L2→L1→L0 two-hop provenance walks
    - a4: Reranking improves order
    - a5: No cross-project leakage
    - a6: Level consistency check
    - a7: Query command exists ( passes)
    - a8: Verify command works ( passes)

Gate criteria (M3 passes when):
  - Hit rate at k=5 ≥ 0.8
  - Provenance precision ≥ 0.9
  - mem verify clean
  - L2→L1→L0 edges resolve
  - Reranking maintains/improves accuracy

Status:
   Tests compile
   Smoke tests pass (a7, a8)
   Full gate ready for seeded database

Blocks: M4 (skills implementation)
Depends: M3.1 , M3.2 , M3.3 
2026-08-25 12:26:06 -07:00
Story Crater Bot ba3aeb38b5 docs: M3.3 implementation complete - mem query command 2026-08-25 12:14:41 -07:00
Story Crater Bot 84f1b07d59 build: add sqlx to dev-dependencies for query integration tests 2026-08-25 12:14:19 -07:00
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
Story Crater Bot 4733b89165 docs: implementation roadmap for M3, M4, M5 with detailed breakdown
M3.2 (rerank client):  COMPLETE (5 tests passing)
M3.3 (mem query): Ready, pipeline specified, code structure ready
M3.4 (gate): Blocked on M3.3

M4.1 (skill draft): 60% done (lesson.rs: 871 lines)
M4.2 (cycle-guard): Detailed spec
M4.3 (gate): Blocked on M4.1-4.2

M5.1-5.6 (post-training): Separate Python, M5.4 can run in parallel

Includes:
- Sequential implementation plan (3 weeks)
- Code structure inventory
- Gate progression tracking
- Parallel tracks (M3.5, M3.6, M3.7, M6)
- Acceptance criteria for each task
2026-08-25 11:59:13 -07:00
Story Crater Bot 747eff7b95 docs: comprehensive guide to M3, M4, M5 phases and remaining work
M3 (4 tasks, READY):
  - M3.1: L2 synthesis ( done, code exists)
  - M3.2: Rerank client ( not started, S size)
  - M3.3: mem query ( not started, M size)
  - M3.4: Composition gate ( blocked on M3.1-3.3)

M4 (3 tasks, BLOCKED on M3):
  - M4.1: skill draft (🟡 60% done, lesson.rs exists)
  - M4.2: derived filter ( not started, cycle-guard)
  - M4.3: Gate ( blocked on M4.1-4.2)

M5 (6 tasks, BLOCKED on M3, separate Python):
  - M5.1-5.3: Labeling, corpus export
  - M5.4: vLLM LoRA serving (can run in parallel)
  - M5.5: verl training loop
  - M5.6: Gate (adapter beats baseline)

64 total tasks: 33 done (52%), 3 in progress, 28 remaining
4/10 gates green
2026-08-25 11:51:17 -07:00
Story Crater Bot ad1147f4a6 docs: clarify vault as separate independent repository
- vault/ has its own .git (separate from parent)
- vault remote: poimen-obesdient-memory (different from parent)
- parent .gitignore ignores vault/ to prevent accidental tracking
- both repos work together: parent has code+JSONL, vault has generated markdown
- two independent CI/CD pipelines (parent: build/test, vault: rebuild/push)

Added:
- VAULT-SEPARATE-REPO.md: structure, why separate, setup guide
- VAULT-GITOPS-ARCHITECTURE.md: data flow and GitOps principles
2026-08-25 11:36:23 -07:00
rock a4a4053d57 feat: add Obsidian vault projection with Longhorn storage (#13)
Build and Push / Test (push) Successful in 3m37s
Build and Push / Build and push image (push) Successful in 2m45s
2026-08-24 01:58:39 +00:00
rock b10c0b9c53 fix: resolve module imports and rerank test format (#12)
Build and Push / Test (push) Successful in 3m35s
Build and Push / Build and push image (push) Successful in 2m39s
2026-08-24 01:45:47 +00: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 b5f77cbc3f fix(ci): copy templates/ for compile-time include_str
Build and Push / Test (push) Successful in 2m49s
Build and Push / Build and push image (push) Successful in 2m27s
2026-08-23 18:08:56 -07:00
Story Crater Bot 18f90fbebb fix(ci): add g++ for esaxx-rs/tokenizers native build
Build and Push / Test (push) Successful in 3m19s
Build and Push / Build and push image (push) Failing after 1m3s
2026-08-23 18:03:30 -07:00
Story Crater Bot b63b9792f4 fix(ci): use rust:1-slim-bookworm (latest stable, needs 1.88+)
Build and Push / Test (push) Successful in 2m50s
Build and Push / Build and push image (push) Failing after 1m20s
2026-08-23 17:58:41 -07:00
Story Crater Bot f4ffc3ef27 fix(ci): bump Rust to 1.86 for sha1 0.11 edition 2024 compat
Build and Push / Test (push) Successful in 2m45s
Build and Push / Build and push image (push) Failing after 1m10s
2026-08-23 17:52:45 -07:00
Story Crater Bot 5464350723 fix(ci): add workspace root src/lib.rs, fix Docker build target
Build and Push / Test (push) Successful in 3m11s
Build and Push / Build and push image (push) Failing after 20s
2026-08-23 17:47:19 -07:00
Story Crater Bot 13a81b4202 fix(ci): commit Cargo.lock for reproducible Docker builds
Build and Push / Test (push) Successful in 2m55s
Build and Push / Build and push image (push) Failing after 1m4s
2026-08-23 17:40:56 -07:00
Story Crater Bot ed702fc800 fix(ci): use git clone instead of actions/checkout (no node in rust image)
Build and Push / Test (push) Successful in 3m34s
Build and Push / Build and push image (push) Failing after 27s
2026-08-23 17:35:45 -07:00
Story Crater Bot e6fe561c8a fix(ci): move workflow to .gitea/workflows/ (Gitea ignores .forgejo/)
Build and Push / Test (push) Failing after 9s
Build and Push / Build and push image (push) Skipped
2026-08-23 17:34:44 -07:00
Story Crater Bot ab3c0da771 test: trigger CI after fixing runner DNS 2026-08-23 17:33:47 -07:00
Story Crater Bot 603c2b681f feat: M3.5.8 complete - all endpoints, rate limiting, and deployment (253 tests)
Changes:
- Queue cleanup: Deleted 17 poisoned CI runs from database
- Code: All M3.5 endpoints implemented and tested
- Tests: 253 total, all passing
- Deployment: K8s manifests and ArgoCD configured
- CI: Forgejo Actions dispatcher issue (image not built yet)

Next: Manual image build or CI dispatcher fix
2026-08-23 17:19:42 -07:00
rock ba4ca6512b Merge pull request 'M3.5.2: POST /ingest endpoint with idempotent async queue' (#4) from cleanup/remove-old-workflows into main 2026-08-23 23:35:38 +00:00
rock 4afccca0c9 Merge pull request 'Trigger: force build image with correct workflow' (#3) from trigger/build-image-force into main 2026-08-23 23:34:03 +00:00
Story Crater Bot aa3fc66aec Trigger: force build image with correct .forgejo/workflows/build.yaml 2026-08-23 16:34:00 -07:00
Story Crater Bot ae778e3478 Implement M3.5.2: POST /ingest endpoint with idempotent async queue (204 tests) 2026-08-23 16:33:34 -07:00
rock 9b5b141da5 Merge pull request 'Clean: completely remove .gitea and .github directories' (#2) from cleanup/remove-old-workflows into main 2026-08-23 23:26:39 +00:00
Story Crater Bot 12350722d3 Clean: completely remove .gitea and .github directories from tracking 2026-08-23 16:26:32 -07:00
rock 16ba8908ef Merge pull request 'Trigger CI: REGISTRY_PAT secret configured' (#1) from trigger-ci-build into main
ci / markdown (push) Waiting to run
2026-08-23 23:24:19 +00:00
Story Crater Bot 4a39821d52 Trigger CI: REGISTRY_PAT secret configured
ci / markdown (pull_request) Waiting to run
2026-08-23 16:24:05 -07:00
Story Crater Bot 4c1ab973fc Update CI setup docs: REGISTRY_PAT now SOPS-managed in homelab
ci / markdown (push) Waiting to run
2026-08-23 16:15:54 -07:00
Story Crater Bot 5bda2b71e4 Standardize CI/CD: use homelab-frontend pattern (REGISTRY_PAT, docker:27-cli, all repos)
ci / markdown (push) Waiting to run
2026-08-23 16:05:18 -07:00
Story Crater Bot dcb684e3e2 Simplify CI/CD: use Forgejo built-in token for registry push
ci / markdown (push) Waiting to run
2026-08-23 16:03:28 -07:00
Story Crater Bot 3723db2327 Add comprehensive deployment status guide
ci / markdown (push) Waiting to run
2026-08-23 09:47:31 -07:00
Story Crater Bot b9482474a6 Add ArgoCD Application for auto-deployment (poimen-memory-app)
ci / markdown (push) Waiting to run
2026-08-23 09:46:58 -07:00
Story Crater Bot 074f87312e Session summary: M3.6.1 complete (196 tests, heading-boundary chunking)
ci / markdown (push) Waiting to run
2026-08-23 09:43:37 -07:00
Story Crater Bot 43239d24ce Implement M3.6.1: DocCorpusSource with heading-boundary chunking (196 tests)
ci / markdown (push) Waiting to run
2026-08-23 09:42:09 -07:00
Story Crater Bot ae606a0685 Fix LLM gateway path, update M1.8 gate test to load real chunks (Option B)
ci / markdown (push) Waiting to run
2026-08-23 00:32:27 -07:00
Story Crater Bot a0ebc1183c Add K8s app deployment, Dockerfile, and CI workflow (Option A)
ci / markdown (push) Waiting to run
2026-08-23 00:01:30 -07:00
Story Crater Bot 906c6c32a4 Downsize memory-db to 2 instances
ci / markdown (push) Waiting to run
2026-08-22 23:53:05 -07:00
Story Crater Bot d3070f087d Fix: use default longhorn (3 replicas), increase to 20Gi
ci / markdown (push) Waiting to run
2026-08-22 23:40:08 -07:00
Story Crater Bot a1a8635a41 Fix: use longhorn-imessage-local (WaitForFirstConsumer) for stable volume binding
ci / markdown (push) Waiting to run
2026-08-22 23:36:25 -07:00
Story Crater Bot 56db39c69f Add deployment ready guide (cluster initializing)
ci / markdown (push) Waiting to run
2026-08-22 23:22:09 -07:00
Story Crater Bot 6147137b45 Bundle memory database into homelab orchestration (remove separate app)
ci / markdown (push) Waiting to run
2026-08-22 23:16:39 -07: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 9c723fe66f doc: update progress - M0 phase complete (35 tests, 8/51 tasks) 2026-08-22 23:13:42 -07:00
Story Crater Bot 6e6de869be feat: complete M0 phase - read-only spine (8/51 tasks)
M0.1 - Cargo workspace + crate skeletons (4 tests)
   6-crate workspace with enforced dependency direction
   GitHub Actions CI pipeline

M0.2 - Domain types and sha256 identity (6 tests)
   Level, Role, Record, Chunk, MemoryNode types
   Content-hash identity (sha256) ensuring rebuild idempotence
   Newtypes (ProjectId, QueryId, RunId) without Default

M0.3 - RecordSource trait + ChunkPolicy (6 tests)
   RecordSource streaming trait
   Chunk policy with token budgets and record boundaries
   Chunking stream that respects budgets without splitting records

M0.4 - Tokenizer-backed chunk sizing (3 tests + 1 ignored)
   Vendored Qwen2 tokenizer with hash verification
   QwenTokenCounter for accurate token counting
   mem tokens CLI subcommand

M0.5 - pi session adapter (5 tests)
   PiSessionSource implementing RecordSource
   Project key extraction from cwd field
   Content flattening for various shapes
   Shared flatten_content helper module

M0.6 - Claude transcript adapter (4 tests)
   ClaudeTranscriptSource implementing RecordSource
   Identical content flattening as pi source
   Cross-source project key agreement

M0.7 - ingest --dry-run (2 tests)
   mem ingest --project --dry-run command
   Zero network calls guarantee

M0.8 - M0 composition gate (5 tests)
   Both sources compose through chunker identically
   Sources are swappable via RecordSource trait
   All role types properly emitted
   Chunk boundaries respected, t values contiguous

Summary:
- 35 integration tests (34 passing, 1 ignored)
- Zero clippy warnings with -D warnings
- All phases compose and verify correctly
- Read-only spine foundation proves extensibility
2026-08-22 23:13:42 -07:00
Story Crater Bot f81006add2 doc: add comprehensive progress tracking 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
Story Crater Bot 144fa33574 test(ci): verify git clone checkout
ci / markdown (push) Canceled after 0s
2026-08-22 00:47:17 -07:00
Story Crater Bot 28e7e60b9d fix(ci): use git clone instead of Node.js actions/checkout
ci / markdown (push) Canceled after 0s
2026-08-22 00:47:10 -07:00
Story Crater Bot fcc76da19c test(ci): verify main-branch trigger
ci / markdown (push) Canceled after 0s
2026-08-21 21:24:23 -07:00