Repository navigation
Pin cross-role waiting list promotion - #3000
Merged
mroderick merged 2 commits intoOct 9, 2026
Merged
Conversation
This was referenced Oct 9, 2026
Promotion on reject filters by the cancelling invitation's role via WaitingList.where_role, so an older entry for the other role must never be promoted when a seat of one role frees up. Nothing pinned that. Pin it on both levels: the model (next_spot returns nothing for a Student seat while only an older Coach entry is waitlisted) and the controller (a Coach waitlist entry's invitation keeps attending nil and the waitlist is unchanged when a Student cancels).
mroderick
force-pushed
the
test/waitlist-cross-role-promotion
branch
from
October 9, 2026 06:56
ef287ff to
a2e3773
Compare
mroderick
marked this pull request as ready for review
October 9, 2026 07:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promotions filter by the cancelling invitation's role via
WaitingList.where_role, but nothing pinned that — a change tonext_spotcould regress cross-role promotion silently. This PR adds the pin at both levels, against master'sWaitingList.next_spot(the rename topromote_nexthappens infeat/post-close-rsvp-waitlist; the filtering rule carries over).One of five small PRs from the same pre-existing-gap audit. Heads are reviewed independently; if a sibling merges first expect a trivial rebase.
Detail
Model level (
spec/models/waiting_list_spec.rb):next_spot(workshop, 'Student')returns nil while only an older Coach entry is waitlisted; the entry survives untouched.Controller level (
spec/controllers/waiting_invitation_controller_spec.rb): a coach is waitlisted, a student seat frees up via reject — the coach invitation keepsattendingnil and the waitlist is unchanged.Review notes
Sibling PRs: