forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to src/db/menu.rsClear filter

2026-09-25

✨ feat(api): server-side filters on the list doorsAhmet Kaan Gümüş · d8dad92
✨ feat(api): server-side filters on the list doors

A caller no longer has to download a capped collection and narrow it
in the client:

- events, exams: the WindowParams pair is SQL (no whole-table load)
  and gains starts_before/ends_before, so a past/completed view is
  expressible
- sessions: starts_after/starts_before, half-open months
- homework: due_after/due_before (the open/past tabs), class_course
- meals menus: slot (was a post-page JS filter — page counts lied)
- users (admin): roles= comma set; courses: kind, q, taught
- appointments + slots: teacher (or me), starts_after/starts_before,
  status
- pomodoro log: from/to, with the focus total summed in SQL
- messages and boards: q (folded literal substring)
- pool questions: ?status= is a WHERE, not a post-filter
- bank/course-notes id filters: garbage is a 400 naming the field,
  not an empty page

Absent params return today's response byte-shape; page and count
share one WHERE.

2026-09-22

test: force both orders in delete-vs-write racesAhmet Kaan Gümüş · 1a7d5c3
test: force both orders in delete-vs-write races

A barrier start is a coin toss under load. The tests required delete to
win a round, so a run where the writer won every overlap panicked even
though no orphan was left. Each witness now awaits delete-first and
write-first, and a concurrent round that does not sweep is not a failure.

2026-09-14

✨ feat: compose-stack deploy plus in-tree schema workAhmet Kaan Gümüş · 57fad2c
✨ feat: compose-stack deploy plus in-tree schema work

Production deploy is podman compose (postgres + backend + openobserve)
instead of a systemd binary. CI stays a throwaway postgres sidecar.
Operator credentials live in ~/hezarfen_backend/hezarfen_backend.env
(0600); the deploy never writes that file.

Also lands the working-tree schema/junction and .sqlx updates that were
already sitting next to this change.
🗃️ feat: pre-prod schema: person join key, drop school password copyAhmet Kaan Gümüş · 804bd3c
🗃️ feat: pre-prod schema: person join key, drop school password copy

app_user no longer stores password_hash (login already verifies
control person). School rows carry person uuid + created_at.
class_blueprint is uuid-keyed; exam child rows composite-FK to
(exam, question); pool/solution images are child tables;
graded_at/marked_at/enrollment timestamps added.

Left alone: occupancy/refcount counters (cap locks, not lies),
ledger source, menu derived id, school.slug PK, fee_plan JSONB.

2026-09-12

2026-09-11

🧹 chore: split meal_attendance, meal_ledger, menu, menu_dish, dietary_profile into domain/db/service layersAhmet Kaan Gümüş · d548120
🧹 chore: split meal_attendance, meal_ledger, menu, menu_dish, dietary_profile into domain/db/service layers

- db/: menu (publish/read/find/list/CAS cap update/cascading delete +
  bump_menu_and_write), menu_dish (create/read/listings/count/patch/delete),
  meal_attendance (mark/list_for_menu/list_for_student), meal_ledger
  (append/read/price_snapshot/list_for_student/balance_of + KindTotal),
  dietary_profile (read/tags_of/save). Bodies byte-identical; entity
  fields pub(crate) for cross-layer construction (exam precedent).
- service/: menu owns MENU_LOCK (multi-call count-then-write span) and
  every dish write (add_dish with the MAX_DISHES_PER_MENU gate,
  update_dish/delete_dish) plus menu/dish read pass-throughs;
  meal_ledger owns charge_booking/reverse_booking/credit orchestration;
  meal_attendance and dietary_profile are read-through pass-throughs.
- domain/: pure remnants only — ids, newtypes, getters, sign convention,
  charge_for/reversal_for row builders, conflicts; ULID IDS minters stay;
  persistence tests ride with their fns into db/.
- web/meals.rs: handlers call service::* only; MENU_LOCK leases and the
  dish-cap gate moved out; validation order preserved.
- re-pointed merged callers (service/meal_booking, db/meal_booking,
  db/exam_attempt doc link) and test imports (integration, regress_meals).

cargo check --all-targets clean; cargo test --lib 577 passed 0 failed;
cargo test --test regress_meals 18 passed 0 failed.