Fix: Competition brackets, account deletion cascade, notifications, a… - #1915
Merged
Olowodarey merged 1 commit intoSep 28, 2026
Conversation
…nd export status - Add tests for bracket generation with odd participant counts (Arena1X#1836) - Enhance account deletion to cascade delete dependent records (Arena1X#1833) - Add tests for cancellation notification delivery to all participants (Arena1X#1837) - Add tests for export status polling for nonexistent requests (Arena1X#1834) Closes Arena1X#1836, Arena1X#1833, Arena1X#1837, Arena1X#1834
|
@designsage8 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch had an error being deployed
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.
Backend Fixes: Competition Brackets, Account Deletion, Notifications, and Export Status
This PR addresses four backend issues related to competition bracket generation, account deletion cascade, notification delivery, and export status polling.
Changes
Task #1836: Competition Bracket Generation for Odd Participant Counts
File:
backend/src/competitions/competitions.service.spec.tsChanges:
Acceptance Criteria:
generateBracketwith 5 participants produces a valid bracket with exactly one first-round byegenerateBracketwith a power-of-two participant count (e.g., 8) produces a bracket with zero byesTask #1833: Account Deletion Cascade to Dependent Records
Files:
backend/src/account/account.service.tsbackend/src/account/account.service.spec.tsChanges:
deleteAccountto explicitly delete all dependent records within the same transaction:user_bookmarks)user_follows)api_keys)notification_preferences)Acceptance Criteria:
deleteAccountremoves the user's bookmarks, follows, and API keys within the same transactiondeleteAccountfor an already-deleted address does not throw an unhandled errordeleteAccountrolls back rather than leaving a partially-deleted accountTask #1837: Competition Cancellation Notification Delivery to All Participants
File:
backend/src/competitions/competitions.service.spec.tsChanges:
Acceptance Criteria:
notifyParticipantsOfCancellationsends exactly one notification per currently-joined participantleave()before cancellation does not receive a cancellation notificationcancel()on an already-cancelled competition does not re-trigger notifications a second time (existing behavior via ConflictException)Task #1834: Account Export Status Polling for a Nonexistent Request
File:
backend/src/account/account.service.spec.tsChanges:
getExportStatusreturns not-found for random/nonexistent request IDsgetExportStatusrejects requests for valid job IDs belonging to different usersgetExportStatusreturns correct status for valid in-progress requests of the callerjob.user_id !== userIdcheckAcceptance Criteria:
getExportStatusfor a random/nonexistent request ID returns not-found, not a thrown 500getExportStatusfor a valid request ID belonging to a different user is rejected/hiddengetExportStatusfor a valid, in-progress request of the caller's own returns the correct in-progress stateTesting
All changes include comprehensive unit test coverage. The existing service implementations were already correct for tasks #1837 and #1834, so only test coverage was added to enforce the behavior. Tasks #1833 and #1836 required both implementation improvements and test coverage.
Checklist
Closes #1836, Closes #1833, Closes #1837, Closes #1834