GPT-6.1 Sol · Balanced
add-guest-management-functionality-to-existing-bookings-cal-com
cal.com · TypeScript · M · 100–299 lines · 6 files
The normal review, with one generalist agent. Judge: Claude Haiku 5.5.
- Gold bugs found
- 4 of 8
- Comments published
- 5
- Comments matching a bug
- 4
- Comments not matching
- 1
- Cost of this PR
- $1.191
Published comments (5)
Team administrators are incorrectly forbidden from adding booking guests — An `ADMIN` who is neither the organizer nor an attendee receives `FORBIDDEN` because `isTeamAdminOrOwner` requires both predicates to pass. Use `isTeamAdmin` directly, since it authorizes both `ADMIN` and `OWNER` memberships, or combine it with `isTeamOwner` using OR.
Guest email casing bypasses the blacklist — An authorized attendee can invite a blocked address by changing its capitalization because `blacklistedGuestEmails.includes(guest)` compares the original casing against lowercase entries. Normalize guest addresses before blacklist comparison and persistence.
Duplicate guest inputs and concurrent requests create duplicate attendees — Repeated emails in `uniqueGuests` create duplicate attendee rows and invitations; concurrent requests do too because `Attendee` lacks booking/email uniqueness. Deduplicate normalized inputs server-side and enforce booking/email uniqueness atomically during insertion.
Guest notifications omit the booking's persisted calendar identity — When `booking.iCalUID` is omitted, `generateIcsString` falls back to `booking.uid`, potentially creating a separate invitation instead of updating the existing calendar event. Preserve `booking.iCalUID` when constructing `evt`.
Unbounded guest additions permit quadratic notification work — An unbounded `guests` array permits large attendee inserts and concurrent notifications, with quadratic aggregate work and attachment volume because each generated ICS includes every attendee. Enforce server-side guest-count and total-attendee limits before insertion and notification fanout.