Skip to content

SMS workflow reminder retry count tracking#3

Open
akshayutture-augment wants to merge 1 commit into
sms-retry-basefrom
sms-retry-enhanced
Open

SMS workflow reminder retry count tracking#3
akshayutture-augment wants to merge 1 commit into
sms-retry-basefrom
sms-retry-enhanced

Conversation

@akshayutture-augment

@akshayutture-augment akshayutture-augment commented Nov 14, 2025

Copy link
Copy Markdown

Test 9


Replicated from ai-code-review-evaluation/cal.com-cursor#9


Note

Adds retry count tracking for SMS workflow reminders, increments on failures, and deletes reminders after multiple retries; includes DB schema/migration updates.

  • Workflows API (packages/features/ee/workflows/api/scheduleSMSReminders.ts):
    • Track retryCount for SMS reminders by selecting it and incrementing on scheduling failure or exceptions.
    • Expand cleanup to delete reminders either past scheduledDate or with retryCount > 1.
  • Database:
    • Add retryCount INT DEFAULT 0 to WorkflowReminder via migration.
    • Update Prisma schema to include retryCount in WorkflowReminder.

Written by Cursor Bugbot for commit 2dae0bf. Configure here.

* 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>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

gt: 1,
},
},
],

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Query Over-Deletes, Removing Valid Data

The deleteMany query uses an OR condition where the second branch { retryCount: { gt: 1 } } lacks the method: WorkflowMethods.SMS filter. This causes deletion of non-SMS reminders and reminders with future scheduled dates whenever their retryCount exceeds 1, unintentionally removing valid records that were never intended to be cleaned up by this operation.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants