Repository navigation
Allow post-close cancellations with frozen waitlist progression #3003
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
mroderick
merged 7 commits into
codebar:master
from
mroderick:feat/post-close-rsvp-waitlist
Oct 12, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
64e7a63
feat(rsvp): add freeze and waitlist close gates
mroderick 6d03529
feat(waitlist): add locked FIFO promotion and atomic seat release
mroderick 190306d
feat(rsvp): allow post-close cancellation with promotion until the fr…
mroderick 42e6b17
fix(waitlist): raise when promotion fails to remove entry
mroderick d650b31
refactor(review): flatten waitlist concern, kwargs, strict locals
mroderick 02afcec
fix(waitlist): never hand the freed seat back to the cancelling member
mroderick 1c0650f
style: omit hash value in waiting-list spec expectations
mroderick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Shared by controllers that cancel a workshop invitation and fill the freed | ||
| # seat from the waiting list. Requires @invitation and the decorated | ||
| # @workshop presenter to be set by the including controller. | ||
| module WaitlistPromotionConcerns | ||
| private | ||
|
|
||
| # Releases the invitation's seat under a row lock so two concurrent | ||
| # cancellation requests cannot each believe they freed a seat. Returns true | ||
| # only when this request moved a seat-holder to not attending. | ||
| def release_seat(**attributes) | ||
| @invitation.with_lock do | ||
| was_attending = @invitation.attending.eql?(true) | ||
| @invitation.update!(attributes.merge(attending: false)) | ||
| was_attending | ||
| end | ||
| end | ||
|
|
||
| def promote_next_waitlist_member | ||
| # Skip the cancelling member's own entry: promote_next must hand the freed | ||
| # seat to the next member, not redeliver it to the person who just gave it up. | ||
| promoted = WaitingList.promote_next(@invitation.workshop, @invitation.role, | ||
| excluding: @invitation) | ||
| @workshop.send_attending_email(promoted, true) if promoted | ||
| end | ||
| end |
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: this partial can take Strict Locals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
-# locals: (invitation:)in d7f6ad4. Both render sites inshow.html.hamlalready pass the local. Note the partial still reads@workshop,@invitation, and@tutorial_titlesfrom ivars, so the guarantee covers theinvitationlocal only.