MiniMax M3 · Heavy
sms-workflow-reminder-retry-count-tracking-cal-com
cal.com · TypeScript · S · 30–99 lines · 3 files
The generalist plus 9 specialist lens agents in parallel, then the same verify and dedup steps. Judge: Claude Haiku 5.5.
- Gold bugs found
- 2 of 5
- Comments published
- 2
- Comments matching a bug
- 2
- Comments not matching
- 0
- Cost of this PR
- $0.147
Published comments (2)
scheduleSMSReminders deleteMany OR clause is not scoped to SMS method — Without an outer `method: WorkflowMethods.SMS` filter on `deleteMany`, the second OR branch (`retryCount > 1`) would silently purge EMAIL or WHATSAPP reminders if any future code path ever sets that field on them. Wrap both OR branches in an SMS filter so the deletion scope matches the handler.
retryCount update is a lost-update race between concurrent cron workers — Two concurrent cron workers can each read `retryCount` as 0 and write 1, losing an increment and delaying the `deleteMany` gate at `retryCount > 1` by one cycle. Replace the JS read-then-write in `prisma.workflowReminder.update` with `retryCount: { increment: 1 }` so the write is atomic.