forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to compose.yamlClear filter

2026-09-22

docs: name the school corpus segment as the hyphenated uuidAhmet Kaan Gümüş · 5af65fc
docs: name the school corpus segment as the hyphenated uuid

The fleet school value and the corpus directory's first segment are the hyphenated uuid. The repo BOOK_PATH default stays the okul-a demo fixture. The school-token regex is unchanged.
Local-Gate: 9fc7c5131f919a6bf13440ef595a7e694a6b82c1 (1407 passed, 32s)

2026-09-17

feat(service): 🧱 indeks önbelleği (#75) — vektörler volume'de kalırAhmet Kaan Gümüş · 36db106
feat(service): 🧱 indeks önbelleği (#75) — vektörler volume'de kalır

Konteyner yeniden yaratıldığında indeks bellekte olduğu için korpus her
seferinde yeniden gömülüyordu; servis bir süre "kaynak yok / hazırlanıyor"
diyordu (hab/2 ile aynı). Artık gömme ÇIKTISI (ids/vecs/sparse) bir volume'e
(`rag-index:/index`, Containerfile varsayılanı `/index`) yazılır ve AYNI korpus
için bir sonraki kurulum AĞI ATLAR. Anahtar içerik+model türevlidir
(doc_id + chunk metin özeti + gömme imzası) — PDF ya da model değişirse
kendiliğinden ıskar. Biçim `.npz` (pickle yok); bozuk dosya HATA değil ıska.

/ready artık sağlayıcı-hazır ile korpus-KURULU'yu ayırır: `korpus_hazir` ve
`hazir_tur` (tam|saglayici|yok). `MultiCorpusService.generator` da korpus
TANIMLI olduğu için değil KURULU olduğu için dolu döner (eskiden `object()`
fallback'i readiness'ı yeşil yakıp soruları `service_warming_up` döndürüyordu).

Gate: pytest tests/unit -q → 1377 passed, 34 skipped, 542 subtests.
feat(deploy): 🧱 küçük varsayılan imge + API sağlayıcı varsayılanı, yerel yığın volume'uAhmet Kaan Gümüş · 1d40da1
feat(deploy): 🧱 küçük varsayılan imge + API sağlayıcı varsayılanı, yerel yığın volume'u

- Dağıtım varsayılanı API: Containerfile ENV RAG_EMBED_PROVIDER=api /
  RAG_RERANK_PROVIDER=api; operatör şablonu deploy/hezarfen_rag.env.example.
  Yerel yol silinmedi — .env ile seçilir.
- Fail-closed açılış ön denetimi (src/service/preflight.py): eksik taban
  adresi/model/anahtar servisi ayağa kaldırmaz (SystemExit 2), eksiği adıyla
  ve çalıştırılacak komutla söyler; anahtar RAG_*_API_KEY ya da
  RAG_*_API_KEY_ENV ile verilebilir.
- Zarf tek kaynak: compose x-rag-envelope (mem_limit_mb 3072, disk_min_gb 8);
  ürün servisi mem_limit 3 GiB; CI kapasite kapısı bu değerleri compose'dan
  okur (eski 12 GB / 20 GB model çağından kalmaydı).
- Küçük imge: requirements üçe bölündü (servis / yerel yığın / eval); yerel
  yığın imaja girmez, eklenti volume'den gelir (deploy/provision_local_stack.sh,
  pip imge içinde, idempotent, PROVISIONED işareti). Geçiş: .env + restart.
- cuda_status torch'u yalnız kuruluysa import eder → API yolu torch'suz koşar.
- Korpus yolu kiracılık düzenine çekildi (okul segmenti zorunlu: compose/env
  varsayılanları açık hata veriyordu).
- Testler: tests/unit/test_providers_deploy.py (25 test) + test_deployment
  mount beklentisi; kapı 1323 geçti / 34 atlandı.
feat(llm): 🧹 sağlayıcı adı temiz kesimi, --env-file düzeltmesi ve kapasite hükmüAhmet Kaan Gümüş · 5d06e87
feat(llm): 🧹 sağlayıcı adı temiz kesimi, --env-file düzeltmesi ve kapasite hükmü

- src/providers/deepseek.py -> src/providers/llm.py; DeepSeek -> LLMClient;
  `deepseek=` kwarg -> `llm=`; bütün çağıranlar güncellendi (kalan tek opsiyonel
  modül adı README/tarih notlarında).
- DEEPSEEK_API_KEY / NVIDIA_API_KEY KALDIRILDI: biri ortamda varsa yapılandırma
  REDDEDER (LLMConfigError; suçlu adı + yerine geçen LLM_API_KEY'i söyler).
  vlm.py de artık LLM_API_KEY okur. Tek adlar: LLM_BASE_URL/LLM_MODEL/LLM_API_KEY.
- deploy unit: operatör dosyası `EnvironmentFile=` ile unit ortamına, compose'a
  TEK `--env-file stack.env`. Yanlış "sonraki dosya kazanır" yorumu podman-compose
  gerçeğiyle değiştirildi (podman_compose.py:2941-2946, :2559, :2562); RAG'daki
  semptom sessiz yanlış-korustu (BOOK_PATH interpolasyonu varsayılana düşüyordu).
- CI: operatör env satır satır ortama alınır (kabuk genişletmesi yok); rollback ve
  ilk-deploy `down` tek dosyaya indi; Kapı 3 konteyner env'inde LLM_API_KEY dolu ve
  BOOK_PATH operatörünkiyle aynı mı diye bakar. Düzeltilmiş/bozuk yol gerçek bir
  konteynerle iki yönlü kanıtlandı (bozuk yol Kapı 3'ü düşürüyor).
- docs: API-CONTRACT §0.3 + BACKEND-INTEGRATION §4.1 okul kapsamı sözleşmesi;
  PROJECT_STATE hab/1 -> hab/2, servis/dağıtıcı gerçeği, §11 kapasite hükmü
  (API gömme + API rerank ile 7,6 GiB'e sığar) + türev-store veri sahipliği kuralı.
- Testler: 1278 passed / 34 skipped.

2026-09-15

chore: 🔧 compose stack, systemd unit and VPS deploy workflow - compose.yaml: env-file driven service (hezarfen_rag.env, operator-owned, from the repo's .env.example); the only environment: block left carries the host-specific corpus choice (BOOK_PATH/SINIF/DERS) as interpolations, so no secret or operator value can be shadowed - Containerfile: ENV block is the single source of the image defaults (HF_HOME/HOST/PORT); CMD now drives the uvicorn factory from $HOST/$PORT instead of hardcoding 0.0.0.0:8000 (a PORT in the env file was ignored) - gpu profile: YAML anchor instead of extends — podman-compose 1.6 crashed with KeyError: _deps whenever the base service was excluded by a profile (podman compose --profile gpu config died outright) - deploy/hezarfen_rag_compose.service: systemd user unit running podman compose --profile product with both --env-file arguments - CI: validate (compileall) ∥ build-and-test (pytest tests/unit, 1240 green in the image) then an SSH deploy gated on /health and /ready, with a capacity preflight (>= 12 GB free RAM, >= 20 GB disk) and rollback to previous_tag; deploy opens only on workflow_dispatch because the service needs ~4.5 GB of models and a GPU to meet the O-05 latency gate - tests/unit/test_deployment.py: two pins follow the new mechanism (operator env file instead of compose environment:; skip when the corpus is absent from the checkout) with the original intent keptAhmet Kaan Gümüş · 723c33f
chore: 🔧 compose stack, systemd unit and VPS deploy workflow
- compose.yaml: env-file driven service (hezarfen_rag.env, operator-owned, from
  the repo's .env.example); the only environment: block left carries the
  host-specific corpus choice (BOOK_PATH/SINIF/DERS) as interpolations, so no
  secret or operator value can be shadowed
- Containerfile: ENV block is the single source of the image defaults
  (HF_HOME/HOST/PORT); CMD now drives the uvicorn factory from $HOST/$PORT
  instead of hardcoding 0.0.0.0:8000 (a PORT in the env file was ignored)
- gpu profile: YAML anchor instead of extends — podman-compose 1.6 crashed with
  KeyError: _deps whenever the base service was excluded by a profile
  (podman compose --profile gpu config died outright)
- deploy/hezarfen_rag_compose.service: systemd user unit running
  podman compose --profile product with both --env-file arguments
- CI: validate (compileall) ∥ build-and-test (pytest tests/unit, 1240 green in
  the image) then an SSH deploy gated on /health and /ready, with a capacity
  preflight (>= 12 GB free RAM, >= 20 GB disk) and rollback to previous_tag;
  deploy opens only on workflow_dispatch because the service needs ~4.5 GB of
  models and a GPU to meet the O-05 latency gate
- tests/unit/test_deployment.py: two pins follow the new mechanism (operator
  env file instead of compose environment:; skip when the corpus is absent
  from the checkout) with the original intent kept

2026-09-13

feat(dagitim): GPU konteyner profili + sessiz CPU'ya dusus korumasi (Refs #96)Kadir Yönak · d116535
feat(dagitim): GPU konteyner profili + sessiz CPU'ya dusus korumasi (Refs #96)

EXP-018'de olculdu: kapi O-05 (p50 <= 6 s) CPU'da GECILEMEZ, GPU'da GECILIR
(p50 4,96 s). Ama imge torch'u SABIT CPU tekerleginden kuruyordu -- yani urun
okul demosunda interaktif OLMAYAN tek yapilandirmaya kilitliydi.

1) Containerfile: `ARG TORCH_INDEX` (varsayilan cpu). GPU imgesi
   `--build-arg TORCH_INDEX=https://download.pytorch.org/whl/cu130` ile kurulur.
   Varsayilan CPU KALDI: GPU imgesi ~2,5 GB daha buyuk ve calismasi icin ana
   makinede NVIDIA Container Toolkit sart.

2) compose.yaml: `gpu` profili (`rag-gpu`), `devices: nvidia.com/gpu=all`,
   `RAG_REQUIRE_CUDA=1`. `product` profili degismedi.

3) SESSIZ CPU'YA DUSUS KORUMASI -- bu degisikligin asil sebebi.
   torch CUDA bulamazsa SESSIZCE CPU'ya duser. Konteynerde bu, saglikli gorunen
   ama her soruya bir bucuk dakikada cevap veren bir servis demektir; log'da tek
   satir uyari yoktur ve demo sirasinda "urun bozuk" diye okunur.
   `RAG_REQUIRE_CUDA=1` bunu ACILISTA hataya cevirir ve mesaj UC OLASI NEDENI
   birden sayar (imge CPU torch ile mi kuruldu, toolkit kurulu mu, --device
   verildi mi) + bedeli sayiyla soyler. Kontrol AGIR ISTEN ONCE: 2,3 GB model
   indirip sonra patlamak operatorun 5 dakikasini cope atardi (test bunu
   dogruluyor).
   Varsayilan KAPALI: CPU kurulumu ve GPU'suz gelistirme bozulmaz; o durumda
   yalnizca acilis UYARISI verilir (sayiyla: "~96 s, kapi 6 s").

4) `/ready` artik `cuda` durumunu makine-okunur raporluyor. Operator "neden bu
   kadar yavas?" sorusunu gecikmeden tahmin ederek degil, uctan okuyarak
   cevaplayabilir.

5) README'ye Linux/Podman bolumu: iki profil, olculen p50'ler, tek seferlik
   toolkit kurulumu ve eszamanlilik siniri (8 ogrencide p50 11,5 s). Eskimis
   "compose yalniz hazirlik kontrolu calistirir" notu duzeltildi (#81'de
   gecersizlesmisti).

DURUST SINIR: GPU imgesi kuruluyor ama HENUZ KOSULMADI -- bu makinede
nvidia-container-toolkit KURULU DEGIL (nvidia-ctk yok, /etc/cdi yok) ve kurulumu
root gerektiriyor. Yani "GPU konteyner calisiyor" DENMEDI; yol hazirlandi,
dogrulama toolkit kurulunca yapilacak.

1212 unit test gecti.
DURUM: INSAN INCELEMESI BEKLIYOR.

2026-09-12

fix(dagitim): konteyner servisi baslatmiyordu; giris noktasi + saglik yoklamasiKadir Yönak · 4ac3ab0
fix(dagitim): konteyner servisi baslatmiyordu; giris noktasi + saglik yoklamasi

#81 (EXP-010/OPS-03 + OPS-17). Onceki halin dogrulanmis sorunlari:
- CMD ["python","-c","import src; print('...hazir...')"] -> imge bir metin
  yazdirip CIKIYORDU; uvicorn hic calistirilmiyordu. `restart: unless-stopped`
  ile birlikte bu SONSUZ RESTART DONGUSU demekti.
- `RUN pip install torch>=2.6 --index-url ...` -> tirnaksiz `>=` KABUK
  YONLENDIRMESINE donusuyor: surum kisiti hic uygulanmiyor, /app/=2.6 cop
  dosyasi olusuyor, pip ciktisi build loglarinda gorunmuyordu.
- EXPOSE yok; compose'da ports ve healthcheck yok.
- .containerignore data/'yi disliyor ama BOOK_PATH varsayilani data/... ->
  PDF konteynerde HIC YOK. Ustelik varsayilan 12. sinif kitabi, o da depoda
  yok (#92) -> konteyner acilista patlardi.
- .env servis yolunda yuklenmiyordu.

YAPILANLAR
- `create_app_with_warmup()` fabrikasi: uvicorn girisi. FABRIKA olarak yazildi
  (modul seviyesinde `app = ...` DEGIL) cunku modulu ice aktarmanin yan etkisi
  olmamali -- yoksa her test ice aktarmasi bir isitma thread'i baslatir.
- Containerfile: gercek CMD (uvicorn --factory), EXPOSE 8000, tirnakli pip
  kisiti + yonlendirme copu olusmadigini DOGRULAYAN build adimi, curl
  (healthcheck imge icinden kosar), ayricaliksiz kullanici, tests/ uretim
  imajindan cikarildi.
- compose: ports (yalniz 127.0.0.1 -- disa acmak bilincli olmali), healthcheck
  /health uzerinden + start_period (boru hatti kurulurken kap SAGLIKSIZ
  sayilmamali), env_file, data read-only mount, model ve maliyet defteri icin
  kalici volume'lar, guvenlik anahtarlari.

GERCEKTEN KOSULARAK DOGRULANDI (yerel uvicorn, 10-biyoloji):
  /health   -> 1. SANIYEDE 200
  /ready    -> 503 (isinirken), 28. saniyede 200
  /rag/chat -> isinirken tipli cevap: reason="service_warming_up"
               hazir olunca: 2 atifli gercek cevap (s.102, s.123)

DURUST SINIR: bu makinede podman/docker YOK; IMGE KURULMADI. Yapilandirma
sozlesme testleriyle sabitlendi (tests/unit/test_deployment.py, 18 test) ve
CMD'nin cagirdigi giris noktasi gercekten kosuldu, ama issue'nun kabul
kriteri ("temiz makinede tek komutla ayaga kalkar") DOGRULANMADI.

Suit: 989 yesil.

Refs #81

2026-09-04

chore(podman): RAG servisi altyapisi - Containerfile/compose/.containerignoreKadir Yönak · 3a4dda1
chore(podman): RAG servisi altyapisi - Containerfile/compose/.containerignore

- Containerfile: python:3.11-slim, konteynerde CPU torch (yerel gelistirmede GPU),
  HF_HOME=/models kalici cache; servis girisi (QUIC api-read) Faz 1 sonrasi.
- compose.yaml: 'product' profili (otomatik kalkmaz), backend paylasilan agina baglanir
  (hezarfen_backend_default), rag-models volume ile model cache kalici.
- .containerignore: .venv/data/eba_dl/mockdata/docs imge disi.