Commits
2026-09-23
✨ 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-12
2026-09-11
🧹 chore: split profile, badge, builder into domain/db/service layersAhmet Kaan Gümüş · 7f616c0
🧹 chore: split profile, badge, builder into domain/db/service layers
C3 identity lane. Moves, not rewrites:
- badge: BadgeStats::load / BadgeAward::list_for / sync (UPSERT with the
earned_at = NONE idempotency stays whole) -> db::badge, with the
award-key mint and the persistence tests; BadgeStat/BadgeStats/earned/
BadgeAward (pure rules) stay in domain::badge; service::badge wraps
list_for/sync for the web layer.
- profile: ProfileStats::load (+ PomodoroTotals, persistence tests) ->
db::profile; newtypes + getters stay; service::profile::load wraps.
- builder: find_by_username/read/create(create_session)/find_by_token/
delete_by_token -> db::builder; the idempotent seed ensure ->
service::builder (ensure_admin precedent); both tests ride their fns.
- preferences, key: fully pure (validated newtypes, composite-id
helpers) — stay domain-only, no db/service modules created.
Entity fields the split constructs from are now pub(crate) (Builder,
BuilderSession, ProfileStats), matching the user split.
Callers re-pointed crate-wide: web/{users,exams/mod,questions,homework,
sessions,auth,extractor,builder,tenant_state}, service/exam_attempt.rs
(badge::sync after start), database.rs (control seed), tests/
{builder_api,e2e,integration}; cross-lane compile fixups in
domain/pomodoro.rs and domain/session_attendance.rs (their lanes
re-point on merge). constant.rs doc link -> crate::db::badge::list_for.2026-09-07
🔒 fix: telemetry privacy sweep, in-flight gauge guards, request-id validation, tenant gauge on createAhmet Kaan Gümüş · ae0957a
🔒 fix: telemetry privacy sweep, in-flight gauge guards, request-id validation, tenant gauge on create - No account name reaches an exported log record: the admin seed (domain/user.rs), the ADMIN_USERNAME refusal and the builder seed (domain/builder.rs) log the event without the `username` field. - The forbidden-key list moves to tests/common (`FORBIDDEN_TELEMETRY_KEYS`, `is_forbidden_key`), gains `username`/`email` and the header prefixes, and is used by both the HTTP-edge and the AI-bridge guard tests. The telemetry suite now also exports tracing EVENTS through an in-memory log exporter and holds log records to the same rule. - `http.server.active_requests` and `ai_requests_inflight` are closed by a `Drop` guard, so a dropped request future (client hang-up, outer timeout) no longer leaks the gauge upwards. A cancelled request is recorded as 499. - A caller-supplied `x-request-id` is only kept when it is at most 64 chars of `[A-Za-z0-9._-]`; anything else is dropped and a UUID is minted, so a client cannot write free text onto `http.request.id` of every span. - `tenant_cache_size` is reported by `Tenants::create` and by the bootstrap insert, not only by the lazy-dial path. - The keepalive logs its first `up` verdict, which its comment already claimed. Claude-Session: https://claude.ai/code/session_018sqvyBCZ9kpQP6vnGomT2s
2026-09-05
✨ feat: one database per school behind a control registry; login names the schoolAhmet Kaan Gümüş · b7dfc0c
✨ feat: one database per school behind a control registry; login names the school Namespace `hezarfen` now holds one DATABASE per school (name = slug) plus a `control` database with the school registry, builder accounts and builder sessions. `Tenants` keeps one separately-connected handle per school; the shadow `web::tenant_state::State` resolves the school from the `<slug>.<token>` cookie so every handler's `st.db` is school-scoped by construction. `POST /auth/login` / `register` carry `school`; a suspended school answers 403 everywhere. `BUILDER_USERNAME`/`BUILDER_PASSWORD` seed the vendor account; the boot admin seed is gone. No customers, no compat shims.