Lesson Learned #112: Phase 1 Cleanup - ChromaDB Removed
Date: January 7, 2026
Severity: HIGH
Category: architecture, technical-debt
What Happened
Comprehensive code audit revealed ChromaDB references in 75+ files despite CEO directive to remove it. Phase 1 cleanup completed same day.
Root Cause
ChromaDB was deprecated but not fully removed from:
src/rag/lessons_search.pysrc/rag/lessons_learned_rag.pysrc/observability/trade_sync.pyscripts/vectorize_rag_knowledge.py- Multiple test files
Impact
- Unnecessary complexity
- Potential import errors in CI
- Confusion about which RAG system to use
Fix Applied
- Removed all ChromaDB code from production files
- Simplified to keyword-based search locally
- Updated trade_sync to use Vertex AI RAG (via CI) + local JSON
- Updated tests to match new architecture
- Updated all workflows to use $5K paper trading secrets
Prevention
- Always remove deprecated dependencies completely, not just comments
- Audit codebase when making architectural decisions
- Use
grep -rto find all references before claiming "removed"
New Architecture
Local Search: LessonsSearch (keyword-based, fast, no dependencies)
Cloud RAG: Vertex AI RAG (via CI workflows, Dialogflow integration)
Trade Storage: Local JSON (always works) + Vertex AI (cloud backup)
Files Changed
src/rag/lessons_search.pysrc/rag/lessons_learned_rag.pysrc/observability/trade_sync.pyscripts/vectorize_rag_knowledge.pyscripts/workflow_health_monitor.pytests/test_rag_vector_db.pytests/test_trade_sync.py- 6 workflow files (API secrets update)
Tags
chromadb, vertex-ai, rag, technical-debt, architecture
This lesson was auto-published from our AI Trading repository.
More lessons: rag_knowledge/lessons_learned
Top comments (0)