Research·40 PRs · 105 graded defects · 4 OSS repos

Architectural context makes AI code review measurably better.

We replayed a public code-review benchmark — 40 real pull requests with 105 human-graded defects across cal.com, Discourse, Grafana, and Keycloak — and compared reviewers under one strict, identical grader. Feeding a model CodeAtlas's architectural context instead of a raw diff lifts every metric that matters: it finds more real bugs, with fewer false alarms.

Best overall
#1
0.72
F1 score

CodeAtlas + Claude

Claude Opus reasoning over CodeAtlas review context

72%
Recall
72%
Prec.
106
Findings
#2
0.48
F1 score

Claude + raw diff

Claude Opus over a plain git diff — no CodeAtlas

51%
Recall
45%
Prec.
119
Findings
#3
0.39
F1 score

CodeAtlas + DeepSeek

Cheap deepseek-v4-flash over CodeAtlas context, with false-positive reducers

55%
Recall
30%
Prec.
193
Findings
#4
0.36
F1 score

CodeRabbit

Commercial AI PR-review bot (3-judge average)

62%
Recall
26%
Prec.
254
Findings

Overall results

All four reviewers scored on the identical 40 PRs / 105 golden defects by one strict 1:1 oracle judge (a true positive must match a golden defect's root cause and location; true positives are capped at the golden count, so over-reporting never inflates the score).

ReviewerFindingsTrue pos.False pos.PrecisionRecallF1
CodeAtlas + Claude
Claude Opus reasoning over CodeAtlas review context
10676/105300.720.720.72
Claude + raw diff
Claude Opus over a plain git diff — no CodeAtlas
11954/105650.450.510.48
CodeAtlas + DeepSeek
Cheap deepseek-v4-flash over CodeAtlas context, with false-positive reducers
19358/1051350.300.550.39
CodeRabbit
Commercial AI PR-review bot (3-judge average)
25465.4/105188.60.260.620.36

CodeAtlas + Claude is the best-of-N review across five samples (highest-recall configuration). CodeRabbit is a 3-judge average; its fractional true-positive count is rounded in per-PR views.

What the data shows

+22 bugs

Context beats the raw diff

The same model — Claude — finds 76 of 105 defects on CodeAtlas context versus 54 on a plain git diff. The architecture pack (entry points, cross-file callers, dependents) is what closes the gap, not a bigger model.

⅓ the noise

Highest signal-to-noise

CodeAtlas + Claude reaches 72% recall with only 106 findings. CodeRabbit needs 254 findings for 62% recall — more than twice the review noise for fewer real bugs. Precision 0.72 vs 0.26.

55%51%

A budget model + context out-finds a frontier model alone

Cheap deepseek-v4-flash reading CodeAtlas context catches 55% of all defects — a better chance at the bug than frontier Claude gets on a plain git diff (only 51%). The right context beats a bigger model.

Model-agnostic

The context carries recall

Swap Claude for cheap deepseek-v4-flash on the same CodeAtlas context and recall holds at 55% — the context, not the model, drives bug discovery. False-positive reducers then make even the budget model competitive (see below).

New · false-positive reduction

Cutting false positives: a cheap model made competitive

A frontier reviewer is expensive. We asked whether a budget model — deepseek-v4-flash, a fraction of the cost — could be made genuinely useful by attacking its one real weakness: false positives. We added precision gates to the review prompt (only flag with diff evidence, never comment on unchanged context code, treat redacted secrets as opaque) plus a deterministic in-diff filter. Same model, same context, same 105-defect golden set — only the reducers changed.

38%
false positives
219135 bad comments · recall held (5958 bugs found)
0.210.30
precision
31% fewer findings (278193), almost all of them noise
0.310.39
F1 score
from the noisiest reviewer to one that edges a commercial bot

Cheap model vs the field

The same 40 PRs / 105 golden defects, same strict judge. DeepSeek is a small fraction of the cost of the alternatives.

ReviewerFindingsTrue pos.False pos.PrecisionRecallF1
CodeAtlas + DeepSeek
cheap model, FP-reduced
19358/1051350.300.550.39
CodeRabbit
commercial PR-review bot
25465.4/1051890.260.620.36
Claude + raw diff
frontier model, no context
11954/105650.450.510.48

With the reducers, the cheap model now beats CodeRabbit on both F1 and precision — and does it with 61 fewer findings (193 vs 254), so reviewers wade through far less noise. It also out-finds frontier Claude-on-raw-diff on recall (58 vs 54 real bugs); raw-diff keeps a higher F1 only on precision, exactly the gap the in-diff filter narrows. The takeaway: the false-positive levers are model-agnostic — they make a budget reviewer viable, not just a frontier one.

By repository & language

True positives out of golden defects per repo. CodeAtlas leads on recall in every codebase — TypeScript, Ruby/SCSS, Go, and Java — showing the gains are not language-specific.

RepositoryStackGoldenCodeAtlas+ClaudeCodeRabbitCodeAtlas+DeepSeekRaw diff
cal.comTypeScript / tRPC3124 · 41f25 · 88f18 · 73f17 · 54f
discourseRuby / SCSS2823 · 30f13 · 78f16 · 39f15 · 27f
grafanaGo / TypeScript2214 · 17f12 · 36f11 · 37f10 · 22f
keycloakJava2415 · 18f16 · 52f13 · 44f12 · 16f

Every pull request

All 40 PRs, per reviewer. Each cell shows true positives / golden and total findings (Nf). Highlighted = every golden defect found.

PRGoldCodeAtlas+ClaudeCodeRabbitCA+DeepSeekRaw diff
cal.com
#723222/2(7f)2/2(13f)2/2(10f)2/2(7f)
#808721/2(3f)2/2(8f)1/2(5f)1/2(3f)
#833022/2(2f)2/2(4f)2/2(7f)2/2(5f)
#1060043/4(5f)2/4(8f)1/4(8f)1/4(5f)
#1096753/5(4f)4/5(12f)3/5(7f)2/5(6f)
#1105954/5(10f)5/5(19f)3/5(8f)3/5(10f)
#1474054/5(4f)4/5(10f)3/5(18f)3/5(7f)
#1494322/2(3f)2/2(3f)0/2(2f)1/2(3f)
#2234521/2(1f)1/2(4f)1/2(4f)0/2(3f)
#2253222/2(2f)1/2(7f)2/2(4f)2/2(5f)
discourse
#132/3(3f)2/3(7f)2/3(3f)2/3(3f)
#221/2(1f)2/2(8f)1/2(5f)1/2(3f)
#322/2(2f)1/2(7f)1/2(4f)1/2(2f)
#466/6(6f)4/6(23f)5/6(6f)2/6(4f)
#521/2(1f)0/2(1f)1/2(1f)0/2(0f)
#611/1(2f)1/1(2f)1/1(3f)1/1(1f)
#733/3(5f)0/3(2f)1/3(1f)3/3(5f)
#832/3(2f)2/3(10f)3/3(5f)1/3(2f)
#921/2(1f)0/2(3f)0/2(3f)1/2(2f)
#1044/4(7f)2/4(15f)1/4(8f)3/4(5f)
grafana
#7618621/2(1f)1/2(2f)2/2(7f)0/2(0f)
#7926552/5(2f)3/5(8f)2/5(4f)2/5(3f)
#8032911/1(2f)1/1(4f)1/1(1f)1/1(2f)
#9004533/3(5f)3/3(5f)2/3(9f)3/3(5f)
#9093921/2(1f)1/2(2f)1/2(3f)1/2(1f)
#9494222/2(2f)1/2(2f)2/2(2f)1/2(1f)
#9752921/2(1f)1/2(4f)1/2(1f)1/2(2f)
#10363322/2(2f)0/2(1f)0/2(2f)0/2(2f)
#10677821/2(1f)1/2(7f)0/2(6f)1/2(4f)
#10753410/1(0f)0/1(1f)0/1(2f)0/1(2f)
keycloak
#3291821/2(1f)1/2(2f)0/2(3f)2/2(2f)
#3383221/2(1f)1/2(5f)2/2(7f)2/2(2f)
#3688032/3(2f)1/3(6f)3/3(7f)2/3(2f)
#3688210/1(0f)0/1(2f)0/1(2f)0/1(1f)
#3703822/2(2f)2/2(10f)1/2(5f)1/2(1f)
#3742942/4(3f)3/4(9f)2/4(3f)0/4(2f)
#3763443/4(4f)3/4(9f)2/4(7f)2/4(3f)
#3844622/2(3f)2/2(4f)0/2(4f)1/2(1f)
#4094022/2(2f)1/2(1f)1/2(2f)2/2(2f)
greptile#120/2(0f)1/2(4f)2/2(4f)0/2(0f)

The actual review comments

Numbers hide what a review actually reads like. Pick any repository and pull request below to read the real, verbatim comments each reviewer wrote — Claude on a raw diff, Claude on CodeAtlas context, and the cheap DeepSeek model on CodeAtlas context — side by side, next to the human-graded defects (⭐). All 40 PRs, same strict judge as the tables above.

cal.comTypeScript / tRPC#7232
Graded recall:CodeAtlas + Claude 2 / 2CodeAtlas + DeepSeek 2 / 2Claude raw diff 2 / 2
⭐ Graded defects · 2
  • G1MediumAsynchronous functions deleteScheduledEmailReminder and deleteScheduledSMSReminder are called without await inside forEach loops. This occurs during booking rescheduling/cancellation, and…
  • G2HighWhen immediateDelete is true, the deleteScheduledEmailReminder function cancels the SendGrid email but fails to delete the corresponding WorkflowReminder record from the database. This creates…
CodeAtlas + Claude
5 findings
Reminder cancellation fire-and-forget on booking cancel

deleteScheduledEmailReminder/deleteScheduledSMSReminder are now called inside an un-awaited nested forEach and were removed from the awaited prismaPromises set (now `[attendeeDeletes, bookingReferenceDeletes]`), so handler returns 'Booking successfully cancelled' before the reminders are actually cancelled. On a…

packages/features/bookings/lib/handleCancelBooking.ts:487
Unawaited reminder cancel inside ineffective try/catch

The forEach calls deleteScheduledEmailReminder/SMS without await, so the wrapping try/catch can only catch synchronous throws (there are none) and cannot catch the un-awaited promises' rejections; the cancellations are fire-and-forget, so a rescheduled booking's previous reminders may still fire and the catch's…

packages/features/bookings/lib/handleNewBooking.ts:966
requestReschedule drops await on reminder cancel

The PR removed `await Promise.all(remindersToDelete)` and now invokes deleteScheduledEmailReminder/SMS inside an un-awaited forEach. Cancellation is a DB update setting cancelled (email) or a delete (SMS); fire-and-forget means it may not commit before the mutation returns, so the previous booking's reminders are not…

packages/trpc/server/routers/viewer/bookings.tsx:488
Workflow update cancels reminders fire-and-forget

After removing the per-reminder prisma.workflowReminder.deleteMany and `await Promise.all(deleteReminderPromise)`, reminder cancellation now runs via un-awaited deleteScheduledEmailReminder/SMS calls (including a `remindersToUpdate.forEach(async (reminder) => {...})` whose callbacks are never awaited). The…

packages/trpc/server/routers/viewer/workflows.tsx:376
Cron reminder-cancel loop aborts on first error

The newly-added loop awaits a SendGrid client.request per reminder inside a single try/catch; one request failure throws out of the for-loop, skipping cancellation and deletion of all remaining reminders, and is only console.log'd. Other cancelled bookings then keep sending reminder emails until a later run. Handle…

packages/features/ee/workflows/api/scheduleEmailReminders.ts:53
CodeAtlas + DeepSeek
20 findings
Missing authentication on DELETE /cancel route

The handler sets `req.userId` to -1 when no session is present, allowing unauthenticated users to attempt booking cancellation. The route is state-mutating (DELETE) but lacks authentication middleware or explicit rejection of unauthenticated requests. The absent middleware list confirms no auth guard.

apps/web/pages/api/cancel.ts
Cancel loop abandons database deletions on SendGrid error

If a SendGrid cancel request fails mid-loop, the for block breaks and the previously collected delete promises are never awaited, leaving cancelled reminder records in the database. This causes orphaned state and potential duplicate cancel attempts on subsequent runs.

packages/features/ee/workflows/api/scheduleEmailReminders.ts
Query only checks cancelled but comment says cancelled/rescheduled

The comment says the code should cancel reminders for both cancelled and rescheduled bookings, but the Prisma query filters only on `cancelled: true`. If rescheduled reminders are not marked with `cancelled: true`, they will be missed and the reminder will be sent anyway.

packages/features/ee/workflows/api/scheduleEmailReminders.ts
SendGrid cancel request lacks timeout

The added `client.request` call to cancel scheduled sends has no explicit timeout. If the SendGrid API is slow, the handler may hang indefinitely, potentially exceeding the serverless function timeout and causing the entire cron run to fail.

packages/features/ee/workflows/api/scheduleEmailReminders.ts
Incorrect type arguments for Prisma client deletion array

The array `workflowRemindersToDelete` is typed as `Prisma.Prisma__WorkflowReminderClient<WorkflowReminder, never>[]`. The second type parameter `never` does not match the actual return type of `prisma.workflowReminder.delete()`, which may cause a TypeScript compilation error or type incompatibility.

packages/features/ee/workflows/api/scheduleEmailReminders.ts
Missing database deletion of workflow reminders on booking reschedule

The PR removes the `prisma.workflowReminder.deleteMany` call that previously deleted workflow reminder records after rescheduling a booking. The new code only calls `deleteScheduledEmailReminder`/`deleteScheduledSMSReminder` but does not delete the database records. This leaves orphaned reminder records that can cause…

packages/trpc/server/routers/viewer/bookings.tsx
Unawaited async calls in workflow reminder cancellation

The PR rewrites the reminder-cancellation loops leaving every call to `deleteScheduledEmailReminder` and `deleteScheduledSMSReminder` unawaited inside `forEach` without a `.catch` handler. Because these are async functions performing outbound network requests, any rejection becomes an unhandled promise rejection. The…

packages/trpc/server/routers/viewer/workflows.tsx
Removed null/referenceId/scheduled guards before calling reminder cancellation functions

The old code guarded every cancellation call with checks on `reminder.scheduled` and `reminder.referenceId`. The PR removes these guards and passes `reminder.referenceId` directly. Since the DB schema allows `referenceId` to be null, this passes `null` or `undefined` to downstream functions that expect a string…

packages/trpc/server/routers/viewer/workflows.tsx
Missing database deletion of workflow reminders after external cancellation

The PR removes calls to `ctx.prisma.workflowReminder.deleteMany` that used to delete reminder records from the database after canceling external reminders in multiple code paths (event type disable, step edit, deactivation, etc.). This leaves orphan records that can cause data inconsistency and affect subsequent…

packages/trpc/server/routers/viewer/workflows.tsx
Inconsistent call signature for deleteScheduledEmailReminder

In some code paths, `deleteScheduledEmailReminder` is called with three arguments (reminder.id, reminder.referenceId, true), while in others it is called with two arguments (reminder.id, reminder.referenceId). This inconsistency suggests a copy-paste error and may lead to unexpected behavior depending on the code…

packages/trpc/server/routers/viewer/workflows.tsx
Undefined variable 'log' in handleNewBooking reschedule error handler

The import is `import logger from "@calcom/lib/logger"` but the error handler uses `log.error` which is not defined. This will cause a ReferenceError at runtime.

packages/features/bookings/lib/handleNewBooking.ts
Changed signature of deleteScheduledEmailReminder breaks caller in reminderScheduler.ts

The function signature was changed from (referenceId: string) to (reminderId: number, referenceId: string | null, immediateDelete?: boolean). The dependent file reminderScheduler.ts (symbols scheduleWorkflowReminders, sendCancelledReminders) still calls the old signature and is not updated in this PR.

packages/features/ee/workflows/lib/reminders/emailReminderManager.ts
+ 8 more findings
Claude + raw diff
7 findings
DB cancellation of reminders is no longer awaited (fire-and-forget regression)

The old code collected the reminder DB-delete promises into `remindersToDelete` and awaited them through the final `Promise.all`. The new code calls `deleteScheduledEmailReminder(reminder.id, reminder.referenceId)` / `deleteScheduledSMSReminder(...)` inside `updatedBookings.forEach(...)` without `await`, and the…

packages/features/bookings/lib/handleCancelBooking.ts
Reschedule path drops the await on reminder cancellation

The PR removed `await Promise.all(remindersToDelete);` and now just fires `deleteScheduledEmailReminder(reminder.id, reminder.referenceId)` / `deleteScheduledSMSReminder(...)` inside `bookingToReschedule.workflowReminders.forEach(...)` with no await and no collection of the returned promises. The DB state mutation…

packages/trpc/server/routers/viewer/bookings.tsx
Multiple unawaited cancellation loops + async forEach callback in workflows router

Several loops were converted from awaited DB deletes to fire-and-forget calls. The PR removed `await Promise.all(deleteReminderPromise);` and the per-reminder `ctx.prisma.workflowReminder.deleteMany(...)`, replacing them with unawaited `deleteScheduledEmailReminder(reminder.id, reminder.referenceId)` calls. Worse, one…

packages/trpc/server/routers/viewer/workflows.tsx
Deferred email cancellation leaves a send-before-cancel window

For the default (non-immediate) path `deleteScheduledEmailReminder` no longer cancels the SendGrid scheduled send; it only marks the row: `await prisma.workflowReminder.update({ where: { id: reminderId }, data: { cancelled: true } });`. The actual SendGrid cancellation is deferred to the hourly cron in…

packages/features/ee/workflows/lib/reminders/emailReminderManager.ts
A single SendGrid request failure aborts all DB deletes and remaining cancellations

In the new loop `await client.request({ url: "/v3/user/scheduled_sends", ... })` runs per reminder inside the `try`, and the collected `prisma.workflowReminder.delete(...)` promises are only awaited after the loop via `await Promise.all(workflowRemindersToDelete);`. If any single `client.request` throws, control jumps…

packages/features/ee/workflows/api/scheduleEmailReminders.ts
immediateDelete branch cancels at SendGrid but never removes/marks the DB row

The `if (immediateDelete) { await client.request({...status: "cancel"}); return; }` branch cancels the SendGrid send but does not delete the `workflowReminder` row nor set `cancelled: true`. The old call sites used to follow the cancel with an explicit `deleteMany`, which this PR removed. For callers where the row is…

packages/features/ee/workflows/lib/reminders/emailReminderManager.ts
try/catch around reminder cancellation in handleNewBooking is ineffective for async calls

The new block wraps `originalRescheduledBooking.workflowReminders.forEach((reminder) => { ... deleteScheduledEmailReminder(reminder.id, reminder.referenceId, true); ... })` in a `try { ... } catch (error) { log.error(...) }`. Because the `deleteScheduled*` functions are async and are not awaited inside the synchronous…

packages/features/bookings/lib/handleNewBooking.ts

Comments are verbatim from the benchmark runs (bodies trimmed to the core claim; code tokens kept as-is; long panels folded as “+N more”). Graded-recall figures are the canonical judged numbers from the leaderboard. Public golden defect text is available for the cal.com PRs; for the other repos the graded defect count and recall come from the same strict judge.

Methodology

Dataset. A public code-review benchmark of 40 merged pull requests across cal.com (TypeScript/tRPC), Discourse (Ruby/SCSS), Grafana (Go/TypeScript), and Keycloak (Java), with 105 defects independently graded by human reviewers as the golden set.

Identical grader. Every reviewer is scored by the same strict 1:1 oracle judge. A finding counts as a true positive only when it matches a golden defect's root cause and location; true positives are capped at the golden count so a reviewer cannot inflate its score by flooding findings. Precision = TP / findings, Recall = TP / golden, F1 is their harmonic mean.

CodeAtlas context. Instead of a raw diff, the reviewer receives CodeAtlas's assembled review context: the changed entry-points, their cross-file callers and implementers, dependent and sibling code, tests, and a windowed diff — the same architectural snapshot that powers the IDE diagrams and the MCP tools. CodeAtlas + Claude here is the best-of-N (highest-recall) review across five samples; the other reviewers are single runs as published.

Competitors. CodeRabbit numbers are a 3-judge average from the benchmark's own published evaluations. Raw-diff Claude uses the identical model with only a git diff. CodeAtlas + DeepSeek runs the cheap deepseek-v4-flash over the exact same CodeAtlas context to isolate the model's contribution from the context's; its figures here include the false-positive reducers (precision gates + in-diff filter) described in the section above — the pre-reducer baseline was 278 findings / 219 false positives / F1 0.31.

The context is the product

The same architectural snapshot that draws CodeAtlas's live diagrams and answers your AI assistant's questions is what makes its code review state-of-the-art. One engine, many surfaces.