Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #898 +/- ##
============================================
+ Coverage 88.43% 88.45% +0.01%
- Complexity 4818 4824 +6
============================================
Files 805 807 +2
Lines 17618 17656 +38
============================================
+ Hits 15581 15618 +37
- Misses 2037 2038 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Closes #833.
BandSpaceLeaveProcessorrecorded the departure in the activity feed and dispatched nothing, unlike every sibling action: a kick dispatchesBandSpaceMemberRemovedEvent, a role change dispatchesBandSpaceMemberRoleChangedEvent. So a member could quit, have their finance recurrences deactivated and their planned entries deleted, and the admins would only find out by scrolling the activity log.What changed
BandSpaceMemberLeftEventplusBandSpaceMemberLeftListener, following the established notification shape: one event, one listener with a single__invoke, the whole body in try/catch with a log so it can never roll back or 500 the departure. Recipients are the remaining active admins, excluding the actor. Dispatched afterwrapInTransactioncommits, so a failed flush cannot announce a departure that did not happen.Admins only rather than the whole roster, because the departure leaves book-keeping only an admin can act on. The payload matches the
band_space_member_removedshape exactly (band_space_id,band_space_name,actor_id,actor_username), and the feed gets a distinct icon and colour from a kick, since quitting and being removed sit side by side in the same list.BandSpaceMembershipRepository::findActiveAdmins()filters on bothrole = Adminandstatus = Active, so a departed or removed admin is never notified.Review
Confirmed by execution rather than by reading: the post-commit dispatch, the admin-query filtering, the fault isolation, and that the frontend branch reads exactly the keys the listener writes.
It also confirmed a gap the implementation had already disclosed:
WithdrawUserFromBandSpacesProcedureperforms the identicalstatus = Lefttransition on the account-deletion path and does not dispatch this event. That is left as is deliberately, and the reasoning is now recorded in that class rather than left implicit. Worth knowing the original justification was wrong: the concern was scattering fresh copies of a deleted member's username, butDeleteAccountProcedureanonymises first and withdraws second, so a notification there would carry the anonymised handle. The real reason not to send it is that admins would be tolddeleted_<uuid>left, which carries the fact but not the person, and changing that is a behaviour change on the deletion path that belongs in its own issue.Verification
Full suite 2331 green, PHPStan level 8 clean, biome clean, build succeeds. New tests cover the notify-admins-only path with a full-body payload assertion, an admin leaving not notifying themselves, and a fault-isolation case proving a throwing notification path still returns 204 with the membership marked
Left.