forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to src/bridge.pyClear filter

2026-09-17

fix: 🔐 hab/2 sözleşmesini sertifika pinlemesi ve kalıcı-red dayanıklılığıyla tamamlaAhmet Kaan Gümüş · 3c4490c
fix: 🔐 hab/2 sözleşmesini sertifika pinlemesi ve kalıcı-red dayanıklılığıyla tamamla

hab/1 -> hab/2 geçişi ve `school` yankısı önceki iki commit'te gelmişti; wire'da
kalan iki boşluk burada kapanıyor.

- AI_TLS_FINGERPRINT: sertifika DÜZ HTTP ile çekildiği için onu pinlemek tek
  başına yetmiyordu — araya giren biri kendi sertifikasını pinletebilirdi.
  Parmak izi artık PEM'den YENİDEN hesaplanıyor, sunucunun bildirdiği
  fingerprint_sha256 yalnızca çapraz denetleniyor (uyduran onu da uydurur),
  pin verilmişse uyuşmayan sertifikaya bağlanılmıyor; boş bırakılırsa TOFU her
  açılışta uyarıyla loglanıyor. Yarım/bozuk bir pin sessizce TOFU'ya düşmüyor,
  yapılandırma hatası veriyor.
- Kayıt kalıcı olarak reddedilince (unsupported_protocol/unauthorized) köprü
  ÇIKMIYOR — zeka ile aynı şekil: üstel geri çekilme, jitter,
  AI_RECONNECT_MAX_SECS tavanı ve logun durum değişiminde BİR kez atılması.
  restart: unless-stopped altında çıkan bir köprü sonsuz crash-loop olur ve
  backend düzeltildiğinde kendiliğinden dönmez; operatörün elle müdahalesi
  gerekir.
- Cevap çerçeveleri artık ok_response/err_response ile kuruluyor: dal başına
  elle dict yazmak bir dalın school'u unutmasına açıktı ve o, backend'de
  error_code=protocol demektir.
- Sertifika her (yeniden) bağlanmada tazeleniyor (backend her boot'ta kendi
  self-signed'ını yeniden üretir); docstring ve ReadMe bunu söylüyor.
- Deploy: Containerfile ENV bloğuna AI_RECONNECT_MAX_SECS, operatör env
  örneğine AI_TLS_FINGERPRINT + AI_RECONNECT_MAX_SECS; CLAUDE.md'ye "tekrar
  keşfetme" notları (reddedilince çık davranışını geri ekleme).

Testler (tests/unit/test_bridge.py): hab/2 işareti, telde Hello gövdesi, dört
cevap dalında okul yankısı, kalıcı redde tavana çekilme + durum başına tek log,
geçici hatada üstel eğri + sağlıklı oturumda sıfırlama, ve gerçek bir X.509
gövdesi üzerinde openssl'in verdiği parmak iziyle doğrulanan aritmetik.
Süit: 465 test OK (skipped=1).

2026-09-15

fix: 🔌 echo the request school so hab/2 frames validate - hab/2 Request carries a required school field and Response must echo it; without it the backend fails every message with error_code=protocol even though the registration handshake succeeded - the school rides through to every Response branch (ok, capability error, timeout, internal) so a refusal is attributed to the right school tooAhmet Kaan Gümüş · e6921b4
fix: 🔌 echo the request school so hab/2 frames validate
- hab/2 Request carries a required school field and Response must echo it;
  without it the backend fails every message with error_code=protocol even
  though the registration handshake succeeded
- the school rides through to every Response branch (ok, capability error,
  timeout, internal) so a refusal is attributed to the right school too
chore: 🔧 compose stack, hab/2 protocol and VPS deploy workflow - compose.yaml: env-file driven single service that joins the backend's podman network and dials QUIC 8090; no ports, no environment block, so nothing can shadow the operator's hezarfen_chatbot.env - Containerfile is the single source of the deployment defaults (AI_* ENV block) and now CMDs the bridge; AI_BACKEND_URL points at the backend's own port 7656 instead of the stale 8080 - bridge.py speaks hab/2: the backend pins AI_PROTOCOL/AI_ALPN to hab/2 and rejects any other hello, so the bridge could never register - deploy/: operator env example + systemd user unit (compose up --no-build with both --env-file arguments) - .github/workflows/main.yml: validate ∥ build-and-test (unittest suite, Composefile image, release artifact) then an SSH deploy that rotates HEZARFEN_TAG in a deploy-owned stack.env, installs the unit, restarts and gates on the backend accepting the registration, rolling back on failureAhmet Kaan Gümüş · e013725
chore: 🔧 compose stack, hab/2 protocol and VPS deploy workflow
- compose.yaml: env-file driven single service that joins the backend's
  podman network and dials QUIC 8090; no ports, no environment block, so
  nothing can shadow the operator's hezarfen_chatbot.env
- Containerfile is the single source of the deployment defaults (AI_* ENV
  block) and now CMDs the bridge; AI_BACKEND_URL points at the backend's
  own port 7656 instead of the stale 8080
- bridge.py speaks hab/2: the backend pins AI_PROTOCOL/AI_ALPN to hab/2 and
  rejects any other hello, so the bridge could never register
- deploy/: operator env example + systemd user unit (compose up --no-build
  with both --env-file arguments)
- .github/workflows/main.yml: validate ∥ build-and-test (unittest suite,
  Composefile image, release artifact) then an SSH deploy that rotates
  HEZARFEN_TAG in a deploy-owned stack.env, installs the unit, restarts and
  gates on the backend accepting the registration, rolling back on failure

2026-08-12

2026-08-11

feat(bridge): Çelebi'yi backend AI köprüsüne bağla + kalite denetimiyle sertleştirKadir Yönak · 24dbf34
feat(bridge): Çelebi'yi backend AI köprüsüne bağla + kalite denetimiyle sertleştir

QUIC hab/1 köprü istemcisi (src/bridge.py): backend'in AI köprüsüne dial-in
eder, chat.reply yeteneğini sunar, sertifikayı /ai/certificate'tan pinler,
rolü backend payload'ından alır (yoksa varsayılan), keepalive ile bağlı kalır.
Yalnızca köprü için tek bağımlılık: aioquic (çekirdek motor hâlâ saf stdlib).

Motor iyileştirmeleri:
- Rol-farkında tie-break (decision.py): öğrencinin kendi notu soruları
  öğretmen intent'lerine kaymaz.
- "Hezarfen" yanlış yazımına kibar uyarı; netleştirme metni kendi kendine
  yeterli (backend chat.reply yalnız text taşıdığından).
- Deobfuscation (engine.py): leetspeak ('5ın4v') + harf-aralama ('S-ı-n-a-v')
  artık düşük-güvenli similarity'de de KURAL eşleşmesine yeniden yazılır.
- Türkçe embedding modeli varsayılan (trmteb/turkish-embedding-model, opt-in).

Kalite denetimi (rol-bazlı audit + adversarial doğrulama) sonrası routing
düzeltmeleri — 18 yanlış sınıflandırma -> 0, OOS kaçakları kapatıldı:
- catalog.py: 17 intent'e örnek zenginleştirme (0 regresyon, precision=1.0).
- rules.py: event_create ünsüz-yumuşaması ('etkinliğ') + student_marks_lookup
  1. şahıs koruması + course_enroll + account_access kural kapsamı.
- domain.py: jenerik fiil çekimleri STOPWORDS'e (OOS recall %80.8 -> %100).

Metrikler: macro-F1 0.877 -> 0.992, accuracy %87.3 -> %98.7, OOS recall
%80.8 -> %100, confusable+diğer yanlış 18 -> 0. Kalite standardı kilitlendi
(test_regression.py: F1>=0.92, acc>=0.92, OOS>=0.90, top3>=0.97). 341 test yeşil.

benchmark_report.py + test_sonuclari.txt: 6 rol x 50 soru tam soru+cevap raporu.