forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to tests/unit/test_api_engine.pyClear filter

2026-09-23

Coklu kaynak sozlesmesi: sources listesi, OLE okuma, atlama durumlarıAhmet Kaan Gümüş · 02e5c99
Coklu kaynak sozlesmesi: sources listesi, OLE okuma, atlama durumları

Frozen contract'a hizalandi (backend seridiyle ayni anda):
- podcast.submit 'sources' tasir: [{key,name,content_type}], en cok 10;
  key source_key guvenlik desenine tabi; legacy source_key tek girdiye
  duser, ikisi de yoksa bad_request. source_keys kaldirildi (hic
  uretimde gormedi, backend onu hic gondermedi).
- Cikarim sihirli baytlarla tur secmeye devam eder; OLE (.doc/.ppt)
  artik antiword/catppt ile okunur (60 sn timeout, utf-8 -> cp1254).
  Containerfile'a antiword + catdoc girdi; pip bagimliligi YOK.
- Bir belge okunamazsa is artık DUSMEZ: o kaynak atlanir, durumu
  skipped:<kod> olarak is kaydındaki sources listesine yazilir ve
  podcast.report yukune eklenen sources alanıyla backend'e gider
  ({key,name,status}). Tumu atlanirsa job ilk atlama koduyla, diskte
  hic kaynak yoksa source_not_found ile, birlesik metin
  PODCAST_MIN_TEXT_CHARS altindaysa no_text_layer ile duser.
- Birlesik metin belge basina \n\n=== <name> ===\n\n basligi tasir;
  tek kaynakli is basliksiz kalir.
- PODCAST_MIN_TEXT_CHARS kontrolu belge basindan birlesik metne tandi;
  boş belge no_text_layer ile atlanir, kisa belge birlenmis kontrolde
  degerlendirilir.
- Testler: 461 -> 489. validate + ASCII/yorum denetimi + fuzz tohumu 1
  yerelde temiz.

2026-09-17

✨ feat(bridge): resolve the source PDF from <school>/<source_key>Ahmet Kaan Gümüş · df0d16a
✨ feat(bridge): resolve the source PDF from <school>/<source_key>

podcast.submit now requires source_key, the blob key of the note's newest
PDF attachment; a payload without it takes the existing bad_request path.
The job record stores source_key next to source_id and the source resolves
at PODCAST_MEDIA_ROOT/<school>/<source_key>. The school segment is
pattern-bound ([a-z0-9-]{1,64}); both segments keep the pattern and
root-containment guards, so a "." key or an escaping slug raises instead of
resolving. The old flat-path lookup is gone, and source_key is a required
record field: a pre-change record is skipped at startup with a warning
instead of failing mid-run.
fix(llm): kapi 200 govdesindeki saglayici hatasi yeniden denemeye giriyorAhmet Kaan Gümüş · 1d92ddc
fix(llm): kapi 200 govdesindeki saglayici hatasi yeniden denemeye giriyor

- Kilo/OpenRouter tipi gecitler yuk altinda HTTP 200 ile {"error":{...,"code":503}}
  donduruyor; istemci bunu 'choices yok' diye okuyup isi ilk saniyede dusuruyordu
- 2xx govdesinde error nesnesi/dizgesi varsa: kod RETRY_STATUS icindeyse yeniden denenir,
  degilse ilk denemede saglayicinin mesaji ile biter
- 5 yeni test: 4 istemci (yeniden deneme, terminal, dizge bicimi) + is seviyesinde gecici
  yukun emilmesi ve kalici yukun ses uretmeden llm_error ile bitmesi
✨ feat(bridge): is kaydi backend'e tasindi - backend'in job_id'si, podcast.report, blob yuklemeAhmet Kaan Gümüş · 18c75c3
✨ feat(bridge): is kaydi backend'e tasindi - backend'in job_id'si, podcast.report, blob yukleme

- submit {job_id, source_id, format, user_id} alir; kimlik backend'den gelir (ayni kimlik -> conflict)
- podcast.status/podcast.result YETENEKLERI KALDIRILDI; durum backend satirindan okunur
- her gecis podcast.report ile bildirilir; done raporu ancak ses yuklendikten SONRA gider (audio_missing korumasi)
- mp3, BlobUploadRequest + tam boyut ham bayt ile backend'e yuklenir (audio_key + duration_secs satira damgalanir)
- reddedilen rapor/yukleme isi NEDENIYLE failed yapar; baglanti yoksa rapor beklemeye alinir ve baglanti gelince flush edilir; sahte done yok
- jobs.py artik turetilmis calisma onbellegi: caller'in gordugu tek kaynak backend satiridir
- 12 yeni rapor/gecis testi + validate 'rapor kablosu' kontrolu + tum suite yesil (381 test)
✨ feat(engine): yerli API motoru (PODCAST_ENGINE=api) ve vendor'siz imajAhmet Kaan Gümüş · fe5e164
✨ feat(engine): yerli API motoru (PODCAST_ENGINE=api) ve vendor'siz imaj

- api motoru: PDF -> PyMuPDF (+tesseract OCR) -> LLM (LLM_BASE_URL/LLM_MODEL/LLM_API_KEY) -> ElevenLabs HTTP -> ffmpeg mux
- PODCAST_ENGINE=api|local (varsayilan api); local bugunku vendored yol olarak korunur, agac yoksa calisma aninda exit 2
- eksik anahtar/HTTP hatasi/timeout: is net kodla failed olur; yarim mp3 done isaretlenmez
- Containerfile vendor agaci olmadan derlenir (kosullu COPY/semboller), tesseract-ocr-tur eklenir
- CI: docker build ve deploy artik PIPELINE_REPO'ya bagli degil; kosu ozeti durumu yazar
- unit: systemd EnvironmentFile + TEK --env-file stack.env (podman-compose 1.6 iki bayragin ilkini yok sayiyor)
- konteyner adi hezarfen_text_to_podcast; deploy sonrasi ortam degiskeni pozitif kontrolu + rollback
- 35 yeni test: stub sunucu (kick/TTS hata siniflari), uctan uca is akisi, on-fix'te kirmizi