fix: Make BOOKING_CANCELLED` webhook payload consistent for regular cancellation and request-reschedule flow#26782
Merged
alishaz-polymath merged 3 commits intomainfrom Jan 13, 2026
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 11 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts">
<violation number="1" location="packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts:280">
P2: `bookingToReschedule.iCalSequence` is never selected from the repository, so this line always computes `NaN`, causing the webhook to emit an invalid iCal sequence.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts
Outdated
Show resolved
Hide resolved
Contributor
Devin AI is addressing Cubic AI's review feedbackA Devin session has been created to address the issues identified by Cubic AI. |
Contributor
|
Reviewed the Cubic AI feedback regarding the The confidence score for this issue is 8/10 (found in the comment metadata), which is below the required threshold of 9/10 for automated fixes. Per the review guidelines, I'm skipping this issue. If you'd like me to investigate and fix this issue regardless of the confidence score, please let me know. |
volnei
approved these changes
Jan 13, 2026
This was referenced Jan 21, 2026
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.
What does this PR do?
Fixes inconsistencies in the
BOOKING_CANCELLEDwebhook payload when triggered via the "Request Reschedule" flow vs regular cancellations.Issues Fixed:
Missing
organizer.id- TheusersToPeopleType()function inrequestReschedule.handler.tswas not including theidfield when converting users toPersonobjects, causing intermittentorganizer.idmissing errors for webhook consumers.Missing payload fields - The request reschedule cancellation webhook was missing several fields that are present in regular cancellation webhooks:
eventTypeId(Int)length(Int)iCalSequence(Int)eventTitle(String)status(String)New
requestReschedulefield - Added a new boolean field to help webhook consumers distinguish between:requestReschedule: false)requestReschedule: true)Changes:
requestReschedule.handler.tsto includeidin organizer and pass additional fieldsBookingWebhookFactory.tsto support new cancellation payload fieldshandleCancelBooking.tsto includerequestReschedule: falsecancelAttendeeSeat.tsto includerequestReschedule: falseBookingWebhookService,BookingPayloadBuilder, DTOs, params)webhooks.mdx)Note: This is a non-breaking change - only adds new fields to existing payloads.
Visual Demo (For contributors especially)
Before (Request Reschedule cancellation webhook - missing fields):
After (Request Reschedule cancellation webhook - complete):
Regular cancellation webhook (now includes new field):
Mandatory Tasks (DO NOT REMOVE)
docs/developing/guides/automation/webhooks.mdxandpackages/features/webhooks/WEBHOOK_PAYLOADS.md.How should this be tested?
Test 1: Regular Cancellation
organizer.idis presentrequestReschedule: falseTest 2: Request Reschedule Cancellation
organizer.idis presenteventTypeId,length,iCalSequence,eventTitle,statusare all presentrequestReschedule: trueTest 3: Seat Cancellation
requestReschedule: falseChecklist