Commits
2026-09-23
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-18
✨ feat(bridge): serve rag.summarize and rag.questions over hab/2Ahmet Kaan Gümüş · d70189f
✨ feat(bridge): serve rag.summarize and rag.questions over hab/2
Two one-shot, scope-addressed capabilities join the dial-in contract: the
backend sends {scope{sinif,ders,pages,span_ids,scope_label}, asker,
asker_role} (+ n/difficulty/seed_question) and the dispatcher routes them
to the already-implemented RagService.summarize / generate_questions.
The service dict carries role.sinif + role.ders_list (these paths have no
pair list, so can_access reads the legacy fields) and user=asker for the
budget counter. Reply mapping tolerates every refusal shape; question rows
keep the service's own soru/cevap/zorluk keys.✨ feat(bridge): 🧩 rag.index served end to end — blob reads, note index, chat channelAhmet Kaan Gümüş · 0877e45
✨ feat(bridge): 🧩 rag.index served end to end — blob reads, note index, chat channel The live service advertised `rag.index` and then typed-refused every request (`index_path_unwired`), so the note "Özet oluştur" surface could never fill: the backend stored no `rag_output` row. The refusal is gone; the capability is now served for real. * transport: `read_blob()` opens the client-initiated stream the contract names (one `BlobRequest` → `BlobResponse` header → exactly `size` RAW bytes), bridged from the executor thread by `_LoopBlobReader`; the transport installs it on the dispatcher at registration. * indexing (`service/notes_index.py`): the note's own title+content always, plus every attachment read over its own blob stream — PDFs through the corpus's own canonical loader, plain text decoded directly — chunked, embedded in one pass (`embed_both`), and written into the school's note index. * store (`index/notes.py`): one bucket per school, `replace_note()` swaps a note's rows as a unit (a re-index cannot duplicate); `rag.chat` merges this channel's ranked hits into the subject corpus's (`Generator(note_index=…)`), with `chunks_by_id`/`span_meta` consulting the live index through `NoteAwareChunks`. * one refused attachment never aborts an index: the note body lands, the answer names what failed (`failed[]`), and the reply echoes `files[].id` so the backend can stamp the doc id it minted. Honest limit (documented in `index/notes.py` and PROJECT_STATE): a note's (class, subject) is not on the wire — the payload carries the course uuid only — so the note channel is school-scoped; the (class, subject) gate cannot be applied to it. The note index is in-process: a restart loses it and the next note edit re-dispatches. Tests: `test_bridge_transport.py` runs the acceptance path against the fake QUIC backend (blob bytes served on a client stream, `files[0].id` echoed) and proves a refused blob is reported, not fatal; `test_notes_index.py` covers the offline indexing path (body-only, re-index dedup, failure isolation, school filter, `rerank_select` compatibility). Pre-fix run (src stashed) shows `'index_path_unwired' != 'malformed'` plus both acceptance tests failing. Unit suite: 1387 passed, 34 skipped. PDF branch smoke-checked against a real 4.5 KB textbook PDF (15 units → 5 children).
2026-09-17
feat(bridge): 🛰️ hab/2 QUIC taşıması — rag.chat telden servis edilirAhmet Kaan Gümüş · ab15dc3
feat(bridge): 🛰️ hab/2 QUIC taşıması — rag.chat telden servis edilir Backend QUIC sunucusudur, servis dial-out eder; eksik olan taşıma yazıldı: - transport.py: sertifika (GET /ai/certificate, HER yeniden bağlanmada) + ALPN hab/2 + Hello/Greeting + QUIC PING + gelen Request'i transport-bağımsız dağıtıcıya verme + üstel geri çekilmeyle SINIRSUZ yeniden bağlanma. Boot politikası: backend yokken süreç çıkmaz, bekler, backend gelince kendiliğinden kaydolur. TLS: AI_TLS_FINGERPRINT doluysa pinlenir (uyuşmazsa bağlanılmaz), boşsa TOFU + her açılışta uyarı. - contract.py: el sıkışma/çerçeveleme sabitleri, build_hello/parse_greeting, encode_frame/FrameStream (uzunluk öneki gövde ayrılmadan ÖNCE denetlenir). - İlan edilen yetenekler rag.chat + rag.index'tir; chat.reply KARŞILANIR ama İLAN EDİLMEZ (o yetenek chatbot'undur). rag.index hâlâ TİPLİ REDDEDER (index_path_unwired) — sahte bir tamam yok. - Testler ağ/DB olmadan: sahte QUIC sunucusu (tests/unit/_fake_bridge.py, src.bridge'ten BAĞIMSIZ yazıldı) ile kayıt, okul eko'su, tipli redler, kopma sonrası yeniden kayıt, backend-yokken boot, yanlış pin reddi. - requirements.txt: aioquic (kardeş servislerle aynı taşıma).
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.
feat(rag): atıf doc_id, rag.index yanıt eşleşmesi ve çift-kapsamAhmet Kaan Gümüş · 110072d
feat(rag): atıf doc_id, rag.index yanıt eşleşmesi ve çift-kapsam
- Atıf sözlüğü artık doc_id taşıyor (generator → handler); backend
course_note_file.rag_doc_id'yi bu anahtardan doldurur.
- rag.index yanıtı {files:[{id,doc_id}]} DTO'ları (RagIndexReply*);
id istekteki RagFile.id ile AYNI.
- rag.chat kapsamı (sınıf,ders) ÇİFT listesi olarak kabul edilir
(RagScopePair); eski sinif+ders_list geriye uyumlu çalışır. Çift
eşleşmesi TAM — kartezyen çarpım AÇILMAZ.
- docs: API-CONTRACT §0.1 + §1 yanıt örneği; BACKEND-INTEGRATION §2.2026-09-11
refactor: paket yapisi ve adlandirma duzeltildi (Kadir'in itirazi)Kadir Yönak · f4da1a4
refactor: paket yapisi ve adlandirma duzeltildi (Kadir'in itirazi)
Iki hakli itiraz:
1. "Turkce isim verme dosyalara" -- depodaki aliskanlik INGILIZCE kod +
TURKCE aciklama (chunker.py, generator.py, metrics.py...). Yeni dosyalarim
bu kurali bozuyordu.
2. "backend dosyasi neden var, src/ingest'te olmasi mantikli mi" -- ikisi de
yanlis yerdeydi.
YENIDEN ADLANDIRMA (dosya + tanimlayici):
sozlesme.py -> contract.py istemci.py -> client.py
ogrenci.py -> student.py ders_eslesme.py -> subject_map.py
senaryo.py -> scenario.py okul.py -> school.py
demo_ogrenci.py -> run_student.py
OgrenciBaglami -> StudentContext SahteOkuyucu -> FakeReader
KopruOkuyucu -> BridgeReader OkulSahtesi -> FakeSchool
baglam_kur -> build_context okul_kur -> build_school (+ ~40 tanimlayici)
Aciklamalar ve degiskenlerdeki Turkce METIN korundu -- kural "Ingilizce kod,
Turkce prose".
YENIDEN YAPILANDIRMA:
src/backend/ -> src/bridge/ Ad yaniltiyordu: bu paket BACKEND DEGIL,
backend'e baglanan taraf. Backend'in kendi
terimi: hab/2 = "hezarfen ai bridge".
scenario/school/run_student -> src/demo/ Ornek veri uretimi URUN KODU
DEGIL. src/bridge ile karisirsa "hangi kod
uretimde calisiyor" sorusu cevapsiz kalir.
src/ingest/eba_* -> src/corpus/ src/ingest bir PDF'i kanonik belgeye
CEVIRIR (parse/OCR/tablo/gorsel); EBA
indirme o PDF'lerin NEREDEN GELDIGIdir.
Biri belge yapisina, digeri aga ve kaynak
sitenin bicimine bagli -- ayri isler.
Ciktilar da yeniden adlandirildi (korpus-butunluk -> corpus-integrity,
ogrenci-senaryosu -> student-scenario, mock-okul -> mock-school);
docs/BACKEND-ENTEGRASYON.md -> BACKEND-INTEGRATION.md ve icindeki paket
tablosu yeni yapiya gore yeniden yazildi.
Suit: 855 yesil.