GPT-6.1 Sol · 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 Haiku 5.5.
- Gold bugs found
- 7 of 9
- Comments published
- 8
- Comments matching a bug
- 7
- Comments not matching
- 1
- Cost of this PR
- $3.108
Published comments (8)
Video booking references lose credential IDs needed for cancellation — Video bookings fail the credential-ID guard in `handleCancelBooking`, leaving external meetings undeleted on cancellation. Preserve `result.credentialId` for video results as well.
Legacy destinations without credentialId fall back to the primary calendar — Legacy destinations supported by `createAllCalendarEvents` lack `credentialId`, so this lookup silently sends their Google events to `primary`. Retain a configured-destination fallback for the legacy credential-selection path.
Recurring collective cancellations delete the first host's events repeatedly — The `bookingToDelete.user.credentials` loop repeatedly deletes the first host's events while leaving other hosts' events undeleted. Use `calendarCredential` and select each occurrence's reference by matching `credentialId` and `reference.type`.
Missing organizer destination drops collective cohost calendars — When the organizer has no destination, optional chaining on `evt.destinationCalendar` silently discards connected cohosts' destinations. Initialize `evt.destinationCalendar` before appending `teamDestinationCalendars`.
Missing destination calendar crashes Google Meet booking creation — With no destination calendar, reading `mainHostDestinationCalendar.integration` throws a `TypeError` for Google Meet bookings instead of using the Cal Video fallback; check `handleNewBooking` for the null case. Use `mainHostDestinationCalendar?.integration` in this condition.
Cohost calendar events use the organizer's destination calendar — Office 365, Lark, and base CalDAV services select the first `destinationCalendar` entry, so cohost requests can fail or target the organizer's calendar. Pass `createEvent` an event containing only the current `destination`, or update those providers to match destinations by credential. **Also found in:** - `packages/app-store/office365calendar/lib/CalendarService.ts:73-76`
Missing calendar IDs break destination fallback for updates and deletions — When `externalCalendarId` is absent, this lookup cannot recover a configured destination, so updates fail and `deleteEvent` can leave non-primary events untouched. Resolve the appropriate configured destination in both expressions instead of searching by the missing `externalCalendarId`.
Reversed billing condition assigns organization slugs at the wrong stage — Billed organizations must retain `requestedSlug` until publication, while non-billed organizations need `slug` immediately. Restore `!IS_TEAM_BILLING_ENABLED` for the `slug` assignment and leave the metadata condition billing-enabled.