BuildMidBackendAuto-graded
Fix pagination that loses records between pages
Walking every page of /records returns fewer rows than the dataset holds. Make each record come back exactly once, in order.The/records endpoint returns a dataset ordered by created_at, then id, one page at a time. Clients that follow next_cursor from the first page to the last get back fewer records than the dataset holds, and which ones are missing changes with the page size. Nothing errors. Fix page() so a full walk returns every record exactly once, in order, with no page larger than limit.30 min
python
You're done when
- A full walk returns exactly the dataset, in order, with no record skipped or repeated.
What it measures
Cursor designHow the cursor lets a client pick up exactly where the previous page stopped.
Reasoning about orderWorking out what each page boundary has to guarantee for the sort order in use.
Checking completenessNoticing records that go missing without an error, and checking a full walk against the source.
Your environment
Terminal + editorA full shell in the browser
Coding agentAlready signed in, no API key to set up
Isolated workspaceOnly yours, wiped when you finish
Start this lab
30 min
Start labYou'll need to sign in to Anthropos first. The lab opens in a private cloud workspace with your coding agent ready to use.AI Labs is part of Anthropos Workforce. Not on your plan yet? Book a demo