Amazon Ergo for code review: find a pagination bug with a three-row fixture

Evaluate amazon/ergo on a realistic review task. Use a repeated timestamp to reveal a skipped record and check whether the proposed fix holds.

A good way to try Ergo for coding is to give it a small change that looks correct until two records share a timestamp. The result is easy to verify, and the review calls for reasoning across a query, a cursor and a test. Start with the Ergo API quickstart.

Reproduce a missing record

Use three events ordered by time and ID: A at 09:00, B at 09:01 and C at 09:01. The first page returns A and B. The next query asks for events where the time is greater than 09:01. C disappears. Ask Ergo to identify the missing event, explain why it disappears and propose a cursor that lets the client resume precisely after B.

A working answer orders by both time and ID, stores both values in the cursor, and fetches rows whose pair sorts after the last pair returned. Changing the time comparison to “greater than or equal” alone would repeat B. Run the fixture with a page size of one as well as two. Concatenating all pages should give A, B, C exactly once.

Make it a fair review

Give your current model the same query and fixture. Check whether each answer explains the defect, supplies a regression test and keeps ordering stable. Track the time to an accepted patch and the cost of retries. For proprietary diffs, choose a route approved for that code before running the exercise. Private Ergo routing on Maple · Model and provider pricing