feat(backend): feed RSVPs into the session at-risk evaluation (#525) #636
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/525-rsvp-at-risk"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The warning was reading the older of two answers.
A slot vote chose a date, often weeks before the evening.
session_attendance.rsvp_statusanswers "are you coming to this session", usually days before it.evaluate_session_at_riskcounted only the former.The model
Each member contributes 1, 0.5 or 0 to
likely_attendance:no→ 0,maybe→ 0.5,yes→ 1); with no RSVP the slot vote stands exactly as before.Two judgement calls, both stated in the code
maybeat half a person — the reading that survives a GM looking at the same screen. Counting it as a yes makes a session where everyone answered "maybe" look perfectly healthy; counting it as a no cries wolf on the tables where "maybe" is just the polite answer."Most recent answer wins" is slightly wider than the letter of the issue, which asks only that
noandmaybebe counted. It is the same sentence's intent — the warning should reflect what people said most recently — and without it a member who votednoweeks ago and has since RSVP'dyesstays counted absent forever, which is the confusing half of the old behaviour rather than a safe part of it. Flagging it because it changes when pings fire in a direction the bullet didn't literally ask for.A "yes" does not beat a recorded absence. Those two disagreeing is worth a GM's attention, not silent resolution in favour of the cheerier one.
The fractional figure
at_riskis judged on the exact value; the reportedlikely_attendanceis that value floored, because it goes into a Discord message and a%dlog line, where "4.5 people" is not something anyone expects to read. Rounding down keeps the number a player sees from ever overstating the figure the warning was decided on — so 3.5 against a quorum of 3 reads "3 likely" and does not warn.Behaviour change worth knowing
This fires on tables it used to miss (three RSVP "no"s against a unanimous slot vote) and stops nagging about ones where everybody has since said they are coming. That is the point of the issue, but it does move when the Discord ping goes out.
Tests
Six new tests in
test_availability.py; four were confirmed to fail against the pre-change source. The other two are guards that pass either way by design: an absence not overridden by a "yes", and a NULLrsvp_statusleaving the old slot-vote behaviour alone.Backend suite:
3472 passed, 13 skipped.ruff check/ruff format --checkclean under CI's pinned 0.4.4.Closes #525
🤖 Generated with Claude Code