Architecture fixes batch — NaN validation, ILIKE indexes, prompt cache, N+1 batching
- _vector_to_str: reject NaN/Inf via math.isfinite() to avoid invalid pgvector syntax
- memory DDL: add pg_trgm + GIN trigram indexes on category/key/value for fast ILIKE fallback
- _build_system_prompt: cache per-profile to avoid rebuilding every iteration
- backfill_embeddings: batch UPDATEs via executemany instead of N+1 loop

No new Python deps; pg_trgm is a PostgreSQL extension auto-created on startup.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent b64b0f3 commit 5cebfcd3110e9b72cd559509ae1af344bea73bd0
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored on 29 Apr
Showing 4 changed files
View
docs/memory.md
View
docs/tech_debt_review_2026-04-29.md
View
navi/core/agent.py
View
navi/memory/store.py