SMS workflow reminder retry count tracking#4
Open
ShashankFC wants to merge 1 commit into
Open
Conversation
* add retry count to workflow reminder * add logic to for retry count --------- Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com>
Author
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| retryCount: { | ||
| gt: 1, | ||
| }, | ||
| }, |
There was a problem hiding this comment.
Unscoped retryCount deletion removes non-SMS workflow reminders
High Severity
The retryCount: { gt: 1 } condition in the OR clause of deleteMany is not scoped to SMS reminders. Since the OR makes each branch independent, this will delete any WorkflowReminder (EMAIL, WHATSAPP, etc.) that has retryCount > 1. The method: WorkflowMethods.SMS filter only applies to the first OR branch. This could cause email and WhatsApp reminders to be permanently deleted by the SMS cron job.
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.


Test 9nn
Summary by CodeRabbit
New Features
Bug Fixes
✏️ Tip: You can customize this high-level summary in your review settings.
nn---n*Replicated from [ai-code-review-evaluation/cal.com-coderabbit#9](https://github.com/ai-code-review-evaluation/cal.com-coderabbit/pull/9)*Note
Medium Risk
Touches production workflow scheduling logic and introduces new deletion criteria based on
retryCount, which could prematurely drop reminders if thresholds or increments are incorrect.Overview
Adds
retryCounttracking toWorkflowReminder(Prisma schema + migration) to persist SMS scheduling failures.Updates
scheduleSMSRemindersto (a) includeretryCountwhen fetching unscheduled reminders, (b) incrementretryCountwhen Twilio scheduling returns nosidor throws, and (c) delete reminders that are either past due SMS entries or have exceeded the retry threshold (retryCount > 1).Written by Cursor Bugbot for commit 2dae0bf. Configure here.