forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on dcf123a8823bd55f0a656ce94de6b865f41dc08aFiltered to src/lib/appointment-actions.tsClear filter

2026-07-25

fix: 🔍 correct 21 defects the last 24h of commits shipped greenAhmet Kaan Gümüş · f9efbbc
fix: 🔍 correct 21 defects the last 24h of commits shipped green

Adversarial audit of 49f9928..ffb1d47: four verifiers found 15 defects the
317-test suite passed over, and a two-lens panel found 6 more in the fixes
themselves. Three of those commits claimed fixes they did not deliver.

- exam room: "saved" was still a lie. Acks were keyed on question_id alone,
  so a timed-out send's late frame settled the retry and the badge claimed
  Saved for a payload the server never took. Replaced with per-send FIFO
  plus an integer debt count per question: superseded/timed-out sends are
  disowned and their frames paid off before any live send settles. failAll
  now takes a required cause — an unattributed error frame keeps the debt
  (the socket stays open), only a real close clears it
- shell feed leaked across accounts: the provider outlived logout, so user B
  saw user A's inbox, badge and appointments until the refetch landed. The
  feed is now built inside a memo keyed on the user id, so a switch disposes
  it rather than relying on a mutate call
- appointments offered actions the backend rejects: book on in-progress
  slots (list filter used where the book guard applies), and a teacher lost
  reschedule permanently because the backend never clears proposed_* — action
  availability now derives from a standing proposal, in a tested pure gate
- every 403 and 404 message was dead: formatApiError returned the per-status
  generic before consulting the table, so entries added for the question bank
  never rendered. Table now wins; 8 appointment 409s and the refresh-from-bank
  400 localized against the backend's exact strings
- request deadline escaped as a raw DOMException because the body read sat
  outside its try, showing Turkish users an English abort message
- unread badge under-counted from a capped inbox page, the two shell badges
  disagreed, and dismiss-all could not clear a count above ten
- students and parents saw their own name on every calendar appointment
- question bank stranded the user on an empty page after deleting the last row
- tests: 317 -> 336, all new ones watched failing before they passed. One
  existing test asserted the ack bug as intended behaviour and was rewritten
- comments in create-ack-waiter claimed safety properties the code lacked;
  rewritten to describe actual behaviour

Known and accepted: shell events/exams fetch unpaged (~3.37MB/poll at 5000
rows) because the backend cannot express a schedule window. Follow-ups for
the backend: starts_after on /events and /exams, and a client seq echoed in
the exam ws saved/error frames to replace the debt heuristic with exact
identity.