← Model losses

Head-to-head comparison

claude-code-cli / claude-sonnet-5-5 / medium / medium effort preferred over claude-code-cli / claude-haiku-5-5 / low / low effort · close win.

Primary judge: Sol 6.1, requested Low. Effective provider effort and internal attempts were not verified. A close win is still a scored preference; it does not establish a material defect.

Reviewed public evidence

Task goal

Read-only debugging analysis of a media-list API. Rows sort ascending by (createdAt,id). A page holds one row. The continuation query uses createdAt > cursor.createdAt and ignores id. Rows A(10), B(10), C(11) exist; page1 returns A and sets cursor10. Rows may be inserted/deleted between pages. Identify exactly which existing row is lost, explain the boundary defect, and propose a minimal cursor/query contract that preserves ties. Distinguish stable tie ordering from snapshot consistency under concurrent changes. Give two verification cases and one assumption you cannot prove. No tools or executed-test claims. Answer in three numbered items, under180words.

claude-code-cli / claude-sonnet-5-5 / medium / medium effort answer

1. **Lost row and defect:** Row **B(10)** is lost. Page 1 returns A and sets the cursor to createdAt=10. The next query, `createdAt > 10`, excludes every row with createdAt=10, including B, which sorts after A by id. It returns C(11) and B is never seen. The cursor stores only half of the sort key, so the strict comparison drops the rest of the tie group.

2. **Contract:** The cursor is the last row's `(createdAt,id)`. The query is `WHERE createdAt > c.createdAt OR (createdAt = c.createdAt AND id > c.id) ORDER BY createdAt,id LIMIT 1`. This gives a stable tie order, meaning a deterministic total order, so existing rows after the cursor are not skipped. It is not snapshot consistency. Rows inserted behind the cursor are missed, rows inserted ahead appear, and a changed createdAt can move a row across the cursor. A snapshot would need a transaction, version, or high-water-mark token.

3. **Verification and assumption:**
   - Case 1: A, B, C with one-row pages should return A, B, C.
   - Case 2: After page 1, delete A and insert D(10) with id greater than B's. The next pages should return B, D, C. A D inserted with an id below A's should not appear. That is expected keyset behavior, not a bug.
   - Assumption I cannot prove: ids are unique, immutable, and ordered in the application the same way the database orders them. The packet doesn't state A.id < B.id.

This was direct analysis, with no team tools and no executed tests.

claude-code-cli / claude-haiku-5-5 / low / low effort answer

1. **Lost row: B.** Assuming id(A) < id(B), the sort order is A, B, C. Page 1 returns A and sets the cursor to createdAt=10. The continuation `createdAt > 10` excludes B because B's createdAt equals the cursor, so only C returns. The defect is that the cursor stores only createdAt, so the query cannot distinguish rows tied with the last returned row. If id(B) < id(A), A is lost instead.

2. **Proposed contract:** Store the last row's full key `(createdAt, id)` in the cursor and query `WHERE (createdAt > :c) OR (createdAt = :c AND id > :i) ORDER BY createdAt, id LIMIT n`. Index `(createdAt, id)`. This gives stable tie ordering. It does not give snapshot consistency: rows inserted before the cursor's position are never seen, and deleted unseen rows are simply omitted. Snapshot consistency needs a fixed read point, such as a transaction snapshot, or an upper bound captured on the first page.

3. **Verification cases:**
   - Rows A(10,id1), B(10,id2), C(11) with page size 1 must yield A, B, C. The current code yields A, C.
   - After page 1, insert D(10,id3) and delete B. The continuation should return D and not B, with no duplicates.

   **Unprovable assumption:** `id` is unique and sorts consistently between the query and index, and `createdAt` has no truncation. The packet shows no schema or collation details.

Primary judge's stated reason

A receives a weak preference because its central diagnosis avoids B's misleading alternative about an already-returned row. This is a slight task-grounded preference, not an established material quality gap; the repair recommendations are substantially equivalent, and an independent review could reasonably weigh B's deletion explanation more heavily.

This reason is the judge's assessment. No independent factual-defect finding is asserted by this record.

Battle wave: 2c66e956-0e43-4c1c-842c-720034acd978. Pair: brp1_601ab9ead5cfac6ab3929d215e2f2689bdc9d4b9480a5cb421bdd4d53a77794d. A separate independent review is required before calling a concern a verified factual defect. Judge disagreement is not recorded here.