forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to src/cache/response_cache.pyClear filter

2026-09-17

feat(rag): 🏫 okul istek bazlı kiracılık — korpus anahtarı, store süzgeci, hab/2 okul eko'suAhmet Kaan Gümüş · b2ba173
feat(rag): 🏫 okul istek bazlı kiracılık — korpus anahtarı, store süzgeci, hab/2 okul eko'su

- guard/tenant.py: okul değeri doğrulaması; okul-scoped ya da hiç (paylaşılan
  'public' boyutu YOK, damgasız satır taşınmaz ve erişilemez).
- CorpusKey artık (okul, sınıf, ders): iki okulun aynı dersi birbirini ezemez;
  resolve() okulsuz isteği school_required ile reddeder.
- Store okulla kapsanır: dense payload'ı + BM25/sparse satır damgası zorunlu,
  aramalar okur okuluna TAM eşitlikle süzülür (kırpma değil süzgeç).
- build_service/ensure yazma damgasını ZORUNLU kılar; tek-korpus modu okulu
  BOOK_PATH düzeninden okur (multi.school_from_book_path).
- Cevap cache anahtarına school eklendi (iki okul aynı soruda hit paylaşamaz).
- hab/2 giriş çerçevesi (BridgeRequest/BridgeResponse) + transport-bağımsız
  Dispatcher: okul çerçevede zorunlu, cevapta aynen eko; rag.chat/chat.reply
  eşlemesi (asker_role -> role); rag.index tipli reddedilir (taşıma yok).
- Testler: okul A okul B'nin chunk'ını göremez (store + registry + çerçeve),
  30 yeni test; süit 1278 yeşil.

2026-09-07

2026-09-05

feat(cache): ResponseCache + EmbeddingCache + maliyet telemetrisi (maliyet opt.)Kadir Yönak · 87dd4f5
feat(cache): ResponseCache + EmbeddingCache + maliyet telemetrisi (maliyet opt.)

- SQLiteCache (stdlib, zero-dep): TTL, lazy GC, bozuk-kayit graceful-miss, thread-lock.
- ResponseCache: canonical anahtar (query+role+model+top_n+candidate_n+ders) -> hit
  DeepSeek cagrisini SIFIRLAR (cost=0). EmbeddingCache: sha256(model+text), batch miss-merge.
- Generator: guard sonrasi/retrieval oncesi cache kontrolu; hit -> LLM/retrieval hic
  calismaz (cache_hit=True); yalniz basarili (abstain olmayan) cevap cache'lenir;
  cache_hits/cache_saved_usd sayaclari; $0 run costlog'a YAZILMAZ (Maliyet tablosu bozulmaz).
- Embedder: opsiyonel cache (cache=None -> eski davranis birebir).
- Test: 33 cache + 8 generator/embedder entegrasyon (red-green); tum paket 222/222.
- BILINEN: SemanticCache/ANN yok (backlog); cache invalidation (icerik-hash) yok;
  multi-process WAL yok; embed_sparse cache'siz; role_ctx=None cache paylasimi riski.

Closes #20