Commit efe468

2026-03-20 19:52:36 Claude (MCP): [mcp] Update V7-1 through V7-3 to COMPLETE, V7 status to PARTIAL
Tasks/VPS_Phases.md ..
@@ 270,17 270,17 @@
---
- ## V7: Semantic Search + Operational Hardening — NOT STARTED
+ ## V7: Semantic Search + Operational Hardening — PARTIAL
- **Status:** Not started as of 2026-03-15. ChromaDB deployed and numpy pinned, but embedding worker and search integration not yet verified.
+ **Status:** Partial as of 2026-03-20. Semantic search complete (FAISS + lifecycle hooks, REST API, MCP tool). Operational hardening not started.
**Goal:** Semantic search works. Backups run. The service is ready for real users.
**Tasks:**
- - V7-1: Embedding background worker. In-process thread (or dedicated worker process) that polls the `reindex_queue` table in SQLite. On dequeue: read page from git repo, chunk, embed with MiniLM, update FAISS index on disk.
- - V7-2: Wire reindex queue. Otterwiki write operations (via MCP or REST API) write `{wiki_slug, page_path, action}` to `reindex_queue` on page save/delete.
- - V7-3: Wire semantic search into MCP sidecar and REST API. Load FAISS index from disk, embed query with MiniLM, search, deduplicate, return results.
+ - V7-1: ~~Embedding background worker.~~ COMPLETE — Implemented via synchronous lifecycle hooks (`page_saved`/`page_deleted`/`page_renamed` trigger FAISS upsert) instead of background worker. HookListener registers hooks; BackendRegistry provides per-wiki FAISS indexes. ONNX MiniLM-L6-v2 embeddings (ChromaDB bundled).
+ - V7-2: ~~Wire reindex queue.~~ COMPLETE — Superseded by hook-based synchronous updates. Page saves/deletes/renames trigger immediate index updates via lifecycle hooks. No queue needed.
+ - V7-3: ~~Wire semantic search into MCP sidecar and REST API.~~ COMPLETE — FAISS backend with IndexFlatIP, per-wiki indexes under `/srv/data/faiss/{slug}/`. REST API: `GET /api/v1/semantic-search`, `POST /api/v1/reindex`, `GET /api/v1/reindex/status`. MCP `semantic_search` tool calls the REST API.
- V7-4: Backup cron. Daily: SQLite `.backup` + `rsync` of `/srv/wikis` and `/srv/data` to offsite storage. Alert on failure.
- V7-5: Health checks. Each service (Otterwiki, MCP, platform API, auth) exposes `/health`. External monitor (UptimeRobot free tier) pings them.
- V7-6: Log rotation. systemd journal or logrotate configuration so logs don't fill the disk.
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9