GLM-5.3 Flash · Heavy
fix-handle-collective-multiple-host-on-destinationcalendar-cal-com
cal.com · TypeScript · S · 30–99 lines · 6 files
The generalist plus 9 specialist lens agents in parallel, then the same verify and dedup steps. Judge: Claude Opus 5.5.
- Gold bugs found
- 5 of 20
- Comments published
- 6
- Comments matching a bug
- 5
- Comments not matching
- 1
- Cost of this PR
- $0.270
Published comments (6)
updateLocation recreates calendar references with undefined externalCalendarId/credentialId — These fields are always undefined because `CalendarManager.updateEvent` returns neither `externalId` nor `credentialId`, so `editLocation.handler.ts` recreates the booking's references without them and later reschedules/cancels lose the Google event. Fall back to `evt.destinationCalendar` or return both fields from `CalendarManager.updateEvent`.
Team destination calendars dropped when evt.destinationCalendar is null — When `evt.destinationCalendar` is null, the optional chain silently drops `teamDestinationCalendars`, so COLLECTIVE bookings create no calendar events for hosts that do have destination calendars. Assign with a spread over `evt.destinationCalendar ?? []` instead.
Video booking references created with null credentialId, breaking seat-cancellation updates — Video results now get a null `credentialId`, but seat cancellation in `handleCancelBooking.ts` relies on `reference.credentialId` to load the credential and update the meeting, so removed attendees stay in the call. Drop the `isCalendarType` guard and always store `result.credentialId`.
Destructuring destinationCalendar without guard throws on null/empty array — When `evt.destinationCalendar` is null or empty, `mainHostDestinationCalendar` is undefined and `.integration` throws, breaking the Google Meet without Google Calendar case this check exists for. Add optional chaining to `mainHostDestinationCalendar?.integration`.
Dead fallback in updateEvent always yields undefined when externalCalendarId is falsy — In the fallback branch `externalCalendarId` is falsy by definition, so `find` can never match and `selectedCalendar` is always undefined, making updates without an external calendar fail instead of using the booking's destination calendar. Fall back to `mainHostDestinationCalendar?.externalId`. **Also found in:** - `packages/app-store/googlecalendar/lib/CalendarService.ts:314-318` - `packages/app-store/googlecalendar/lib/CalendarService.ts:315-317` - `packages/app-store/googlecalendar/lib/CalendarService.ts:314-317`
Inverted billing condition: slug set on cloud instead of self-hosted — The dropped negation means self-hosted organizations are created without a `slug` while cloud organizations get one immediately, bypassing the `requestedSlug` reservation flow that holds the slug until the organization is published. Restore the negation in the ternary.