Claude Sonnet 5 vs GPT-5.6 Luna for code review

The verdict

GPT-5.6 Luna wins, 9589

Same 12 code review tasks, marked blind by three rival labs. GPT-5.6 Luna took 5 tasks, Claude Sonnet 5 took 2, 5 tied. Tested 18 Aug 2026.

Where they differed most

The task — The pagination that skips page one

Review this function. Context you can rely on: `page` is 1-based — the public API docs promise that page=1 returns the first page; `items` is always an array and may be empty; `perPage` is taken straight from a query string. function pageOf(items, page, perPage) { const start = page * perPage; const rows = items.slice(start, start + perPage); const lastPage = Math.ceil(items.length / perPage); return { rows, total: items.length, lastPage, hasNext: page <= lastPage }; } List the real defects, most damaging first, and for each one say what a user of the API would actually SEE — not what the code does, what they notice. Then give the corrected function. Do not list style preferences as defects.

## Defects, most damaging first

**1. `start = page * perPage` — page=1 doesn't return the first page**
Since `page` is documented as 1-based, `page=1` should map to `start=0`. Instead `start = 1 * perPage`, which skips the entire first page.

**What the user sees:** They call the API with `page=1` (per the docs, "the first page") and get back the *second* page of data. The first `perPage` items are never retrievable through the API at all — no combination of page numbers ever returns them. This silently corrupts every paginated response and vi…
1. **`perPage` is used as a string in the slice endpoint.**  
   Since query-string values are strings, `start + perPage` concatenates instead of adding. For example, with `page=1` and `perPage="10"`, the API can return items 11 through the end of the collection—90 items instead of 10. This is especially damaging because the response may look superficially valid while containing the wrong page size.

2. **The starting offset is off by one page.**  
   `page=1` should start at index `0`, but the function starts at `perPage`. With a numeric `perP…

Task by task

TaskClaude Sonnet 5GPT-5.6 Luna
The pagination that skips page one69
Nothing wrong with it810
Three things wrong in six lines810
Two customers, one last item99
Rank by what breaks109
The review, as JSON99
Slow is not the same as wrong1010
Overdue at one in the morning910
Write only the comment1010
The complaint that is not a defect89
Right, and unusable109
Refuse the rubber stamp1010

Full receipts: Claude Sonnet 5, GPT-5.6 Luna · judges gemini-3.1-pro-preview, gpt-5.6-terra, grok-4.5

Questions people ask

Which is better for code review: Claude Sonnet 5 or GPT-5.6 Luna?

GPT-5.6 Luna — it scored 95/100 against 89/100 on our 12-task code review suite, winning 5 tasks to 2 with 5 tied. Every answer was marked blind by three judges from three rival AI labs.

How was this tested?

Both models answered the identical published code review tasks. Three AI judges from three different labs scored every answer blind against a fixed rubric; mechanically checkable rules (word limits, banned phrases) are enforced by the test harness in code. The raw outputs and judge verdicts are downloadable.

More code review head-to-heads: GPT-5.6 Luna vs GPT-5.6 Sol · Claude Sonnet 5 vs GPT-5.6 Sol · GPT-5.6 Luna vs GPT-5.6 Terra · GPT-5.3-Codex vs GPT-5.6 Luna · GPT-5.5 vs GPT-5.6 Luna · GPT-5.6 Luna vs Grok 4.5

Full ranking: Best AI for code review · model pages: Claude Sonnet 5, GPT-5.6 Luna