feat: gate mentor auto-assign on CONFIRMED finalist status
mentor.autoAssignBulkForRound now skips any project whose finalist confirmation isn't CONFIRMED — there's no point assigning a mentor to a team that won't be at the grand finale. Other eligibility rules (wantsMentorship, admin_selected, already-assigned) are preserved. Updated existing requested_only and skip-already-assigned tests to seed CONFIRMED confirmations so they continue to isolate their target gate. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -717,6 +717,10 @@ export const mentorRouter = router({
|
||||
roundId: input.roundId,
|
||||
project: {
|
||||
mentorAssignment: null,
|
||||
// Only assign mentors to projects whose team has confirmed they will
|
||||
// attend the grand finale. This skips PENDING/DECLINED/EXPIRED/SUPERSEDED
|
||||
// confirmations and any project without a confirmation row at all.
|
||||
finalistConfirmation: { status: 'CONFIRMED' },
|
||||
...(eligibility === 'requested_only' ? { wantsMentorship: true } : {}),
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user