Commits
2026-09-23
🐛 fix(rag): send the caller's scope pairs on study framesAhmet Kaan Gümüş · 987866d
🐛 fix(rag): send the caller's scope pairs on study frames The door authorized the pair but the frame carried only asker_role, so the service's fail-closed guard had no grant for student/teacher/parent and answered role_denied — the study actions never worked for those roles. The frame now carries the same backend-computed pair list the chat path grants with. Local-Gate: 65e598f47ebccf205e95c26007671ece85818a66 (1516 passed, 449s)
🐛 fix(rag): resolve the study pair through the search foldAhmet Kaan Gümüş · 1e8567d
🐛 fix(rag): resolve the study pair through the search fold Citations carry ders in the service's slug vocabulary (lowercase, diacritic-stripped) while scope pairs carry course titles, and the door compared them byte-exact — so Soru üret/Özetle on a study answer 403'd for every role. Exact match stays the fast path; the folded fallback refuses with a 400 when two distinct titles fold equal, never a first-wins guess. Local-Gate: 3bdd611a53d3849b1f5d3473cf39d86c08fb3768 (1515 passed, 455s)
✨ feat: school identity is the uuid; drop the slugAhmet Kaan Gümüş · 2918040
✨ feat: school identity is the uuid; drop the slug
The school slug is gone from every surface: the session cookie prefix,
the /schools/{id} builder routes, FILES_PATH blob dirs, the hab/2 frame
school value, DTOs, and the /limits contract. SchoolId::try_parse is the
one wire parse (hyphenated uuid only); a non-uuid frame school answers
unknown_school. Register gets a public picker via the new unauthenticated
GET /auth/schools returning active [{id, name}]. The control migration
drops school_slug and the slug column, which invalidates every existing
session — old cookie prefixes cannot resolve.
Local-Gate: 3fafffd98aec59c68e2606833b87785d0abf2fee (1510 passed, 425s)2026-09-22
🐛 fix: scope manager study questions to the school and publish its nameAhmet Kaan Gümüş · 20e856a
🐛 fix: scope manager study questions to the school and publish its name
An admin with no personal class row was dispatched to rag.chat with zero
scope pairs, so every study question abstained. Managers and admins now
get every class-course pair. A rag.index registration replays notes that
have files, because that index is in-memory and a restart wipes it.
GET /school returns {id, name} to every school session. No slug.2026-09-18
✨ feat(rag): relay rag.summarize and rag.questions over the bridgeAhmet Kaan Gümüş · 69d4295
✨ feat(rag): relay rag.summarize and rag.questions over the bridge The RAG service has had two study features the backend never dispatched: a scope summary and a set of generated practice questions, each one-shot and addressed to exactly one (sınıf, ders) corpus. - constant.rs: AI_RAG_SUMMARIZE_CAPABILITY / AI_RAG_QUESTIONS_CAPABILITY with 25 s deadlines — a waiting door must finish under the 30 s request envelope; MAX_RAG_QUESTIONS is published at /limits. - ai/rag_study.rs: the two payload/reply contracts and their dispatch, wire-key pinned. - web/rag.rs: POST /rag/summarize and POST /rag/questions over the same QUIC bridge and the same 503 capability gate as the rest of the nest. The asker's (sınıf, ders) pairs come from their memberships; the body only names a target inside them (403/400 otherwise). An abstention is a complete 200; only role_required/scope_mismatch — the backend's own bug — is a 502. README endpoints table regenerated; AI bridge prose extended with both contracts and the honest RAG-side limits. Local-Gate: 852ea13260383ac5c071fce412db110becbcbdde (1505 passed, 473s)
2026-09-17
📝 docs: rewrite the Turkish comments and doc comments in EnglishAhmet Kaan Gümüş · 7fec874
📝 docs: rewrite the Turkish comments and doc comments in English The Rust repo's own language is English; Turkish had leaked in from the sibling AI services. Translate every comment and doc comment to English using the code's own vocabulary (şube -> class section, dönem -> term, sınıf öğretmeni -> homeroom teacher, ortak sınav -> shared exam, karne -> report card, …). Quoted Turkish letters/words that are themselves the data under test (the text-fold examples in `text_fold`/`settings`, the non-ASCII filename sample) are kept. The README endpoint table is generated from those doc comments, so it is regenerated. AGENTS.md records the convention going forward: Turkish survives only where it is the data under test or user-visible content.
✨ feat: add the /rag nest over the course-note RAG bridgeAhmet Kaan Gümüş · a61e0a6
✨ feat: add the /rag nest over the course-note RAG bridge A separate rag_thread/rag_message pair of tables and a Module::Chatbot gated /rag nest, mirroring the chatbot's asynchronous send: POST answers 202 with a pending assistant row, an in-process task settles it, and both the poll read and the SSE stream project a stale pending row as failed. Every question is scoped server-side to the asker's own (sinif, ders) pairs — class-section instances, a linked parent's children, school-wide club/study memberships — never from the body. Each citation's corpus doc_id is resolved per candidate to a course-note file the asker may view, and the two storage caps refuse an over-bound reply whole rather than clipping it. rag.index replies now stamp each file's rag_doc_id, the missing link between a citation and its file. The chatbot's SSE helpers move to web/mod.rs so both nests stream through one implementation, and the instance/course visibility gates move from web to service so the scope deriver and the routes share one rule. Gates: cargo check --all-targets, clippy -D warnings, limits_completeness, spec_bounds, doc_sync (README regenerated), protected_routes_require_session (MIN_PROTECTED 269 -> 318, the real swept count), ai_bridge (75 tests).