DeepSeek V4 Pro · Heavy
feat-convert-insightsbookingservice-to-use-prisma-sql-raw-queries-cal-com
cal.com · TypeScript · M · 100–299 lines · 1 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
- 1 of 3
- Comments published
- 2
- Comments matching a bug
- 1
- Comments not matching
- 1
- Cost of this PR
- $1.320
Published comments (2)
teamId is optional for team scope in public options type — A team-scope caller can now omit `teamId` and the lookup runs with `id: undefined`, silently returning `NOTHING_CONDITION` or matching the wrong team. Keep `teamId` required for the team scope, e.g. as a discriminated union, or handle the missing value in `buildTeamAuthorizationCondition`.
Prisma.sql deep-equality fails due to nested fragment construction — The service composes conditions with nested `Prisma.sql` fragments via `reduce`, so `toEqual` compares different internal `strings`/`values` arrays and the assertions fail—nested `Sql` fragments are only flattened at serialization time. Build the expected fragments with the same nested composition, or assert on the rendered `conditions.sql` instead. **Also found in:** - `packages/lib/server/service/__tests__/insightsBooking.integration-test.ts:429-431`