forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to service/src/bridge.pyClear filter

2026-09-18

feat(capabilities): 🔌 register the insight.* handlers and gate the Hello frame on themAhmet Kaan Gümüş · 618a44d
feat(capabilities): 🔌 register the insight.* handlers and gate the Hello frame on them

The dispatch table was empty while the Hello frame announced three names, so
every dispatched insight.student / insight.refresh was answered
`unknown_capability` -- live, against the deployed backend. handlers.wire()
registers all three on the runtime path (bridge.run_once), and
capabilities.verify_dispatchable() refuses to boot when an advertised name has
no handler, so advertising and dispatch cannot drift apart again.

- insight.student: one student, computed and written now; `since` moves the
  attention window's term start, `sections` narrows the four summary modules
  (an unrequested module is written `null` = "not computed", which the
  backend's SummaryRow keeps apart from `{}`).
- insight.class: the course roster derived from that course's addressed
  homework (the only id source the bridge read allowlist exposes), computed as
  a cohort; `topic_gaps` stays empty and `coverage.unavailable` says why.
- insight.refresh: the school sweep through run_school(nightly=True), so the
  zeka_run ledger row that GET /insights/runs serves is written (running +
  verdict). A discovered roster also purges departed students and sweeps
  retention; `user_ids` is a subset, not a roster, and never purges.
- run_school gains nightly/sections/outcomes; a scoped compute writes no
  ledger, no purge and no sweep. Purge is now gated on a discovered roster,
  which also closes the silent data-loss path in `cli --students`.

Tests: tests/test_handlers.py (fail-pre-fix dispatch, contract fields per
capability, boot self-check, scoped-refresh no-purge); the truth pins in
tests/test_capabilities.py and the purge expectations in test_pipeline.py are
updated to the merged backend dispatch (insight.student + insight.refresh
sent, insight.class still not).

2026-09-17

♻️ refactor: ZEKA'yı köprü deposuna taşı — veritabanı erişimi tamamen kaldırıldıAhmet Kaan Gümüş · d98ed4b
♻️ refactor: ZEKA'yı köprü deposuna taşı — veritabanı erişimi tamamen kaldırıldı

Değişmez kural: bir AI servisi uygulama veritabanına asla doğrudan erişmez.
ZEKA'nın kendi deposu yoktur; hesapladığı her satır ve okuduğu her liste
backend'e QUIC köprüsünden `insight.*` yetenek çağrısıyla gider.

* silindi: pg_client.py, store_pg.py, tenants.py, store_factory.py,
  schema/, psycopg bağımlılığı, ZEKA_PG_DSN ve ZEKA_DB_*/ZEKA_SCHOOL_* knobs
* yeni: store.py köprü deposu (BridgeStore + okul kapsamlı SchoolStore,
  BridgeCaller seam, 500'lük gruplar, 2 deneme + atla -> partial), protocol.py
  yetenek çerçevesi, bridge.call_capability
* açılış hiçbir şey açmaz; backend yokken loglanır ve geri çekilerek denenir
* yazma düşerse koşu partial olur, okulun günü kapanmaz ve `store`
  failed_modules ile koşu defterine yazılır (kalıcı kayıt)
* okul listesi backend'den (insight.schools.list); ZEKA_SCHOOLS yalnız filtre
* CLI/compose/env/docs: DSN ve şema yükleme yolları kaldırıldı
feat(tenants): 🏫 ZEKA'yı çok okullu yap: kontrol DSN'i, okul başına veritabanıAhmet Kaan Gümüş · 1fd6960
feat(tenants): 🏫 ZEKA'yı çok okullu yap: kontrol DSN'i, okul başına veritabanı

ZEKA_PG_DSN artık KONTROL veritabanıdır; her okulun çıktısı kendi veritabanına yazılır. Ad backend'in kendi kuralından türer ({kontrol}_school_{uuid}, tenant.rs:112) ve slug'dan uuid'ye çözümleme kontrol veritabanındaki school satırından yapılır (TTL'li tek sorgu, okul başına N+1 yok). Desene güvenilmez: kütükte olmayan okul reddedilir.

Okul havuzları SINIRLIDIR: ZEKA_MAX_SCHOOL_POOLS (vars. 8) + ZEKA_SCHOOL_POOL_TTL_SECS (vars. 900s), LRU tahliye ve tahliyede bağlantının GERÇEKTEN kapanması (pg_stat_activity ile ölçülür).

Açılış okul satırı istemez, okul veritabanına bağlanmaz: eksik/migrate edilmemiş okul veritabanı İSTEK hatasıdır (unavailable / school_not_migrated), asla kontrol ya da başka bir okula düşülmez. ZEKA_SCHOOLS artık filtredir (varsayılan boş = bütün aktif okullar).

LLM adları filo standardına TEMİZ KESİM: LLM_API_KEY / LLM_BASE_URL / LLM_MODEL_*; eski DeepSeek/SEGMENT_* adları reddedilir.

Kapı: scripts/ci-yerel.sh --konteyner 5/5 yeşil (konteyner kanıtı yeni cok-okullu açılış adımını da ölçer).

2026-09-16

createMuhammet Ozdemir · 98b2423Browse files