forge
Explore
Log in

Don't you dare go Hollow

🍽️ correct what an orphaned mark could be read through

Browse files at this commit

36c718ae5166227ae384dd0d957d135eee5aa231Ahmet Kaan GümüşParent: 02b1ff8
  • docs
    • 🍽️ correct what an orphaned mark could be read through
Show full message
docs: 🍽️ correct what an orphaned mark could be read through

Said reading one was impossible because every path went through the
menu. Only the writes do: the student's own attendance list filters on
the student and a date window, never on the menu still existing, so
such a mark would have come back there. Nothing can create one now,
and the sweep is what clears them.
README.mdmodified+6 -2
@@ -1866,8 +1866,12 @@ write *writes* rather than something it reads and then trusts: a delete racing
1866 it touches the very row it bumps, and the store refuses to commit both. That1866 it touches the very row it bumps, and the store refuses to commit both. That
1867 matters more here than tidiness, because a menu's id is deterministic on1867 matters more here than tidiness, because a menu's id is deterministic on
1868 day+slot — a mark that outlived its menu would come back as a mark on the next1868 day+slot — a mark that outlived its menu would come back as a mark on the next
1869-menu published for that meal, and reading it or clearing it is impossible in1869+menu published for that meal. Only the *write* paths ever check the menu:
1870-the meantime, since every path to it goes through the menu.1870+`GET /meals/attendance/{user}` filters on the student, never on the menu still
1871+existing, so such a mark would be read back there (a `?from=/?to=` bounded read
1872+drops it, since a link to a deleted menu has no date to compare) while no write
1873+could touch it. Nothing can create one any more, and the menu delete's own
1874+sweep is what clears the marks a menu leaves behind.
1871 1875
1872 **Attendance has zero billing effect.** Booking is the sole charge trigger, so1876 **Attendance has zero billing effect.** Booking is the sole charge trigger, so
1873 a student who booked and did not eat still pays — the kitchen bought the food.1877 a student who booked and did not eat still pays — the kitchen bought the food.