refactor: extract eviction engine into eviction.py (rag.py 303→109 lines)

- Move all eviction logic (evict_batch, maybe_evict, EVICTION_LOG,
  get_collection_count/stats, get_rag_operational_stats) into eviction.py
- Move QDRANT_URL, RAG_COLLECTION into config.py to break circular dep
- rag.py re-exports eviction symbols for backward compatibility
- Router imports updated to use eviction module directly
- All 130 tests pass
This commit is contained in:
gramps
2026-07-06 08:00:26 -07:00
parent 8072fb3dd0
commit bb16cd6927
7 changed files with 227 additions and 210 deletions
+2 -4
View File
@@ -5,10 +5,8 @@ import httpx
from fastapi import APIRouter, Request
from fastapi.responses import JSONResponse
from rag import (
get_rag_operational_stats, EVICTION_LOG,
QDRANT_URL, RAG_COLLECTION,
)
from eviction import get_rag_operational_stats, EVICTION_LOG
from rag import QDRANT_URL, RAG_COLLECTION
log = logging.getLogger("jarvischat")
router = APIRouter()