Pagination Contract Failures
Missing, duplicate, or inconsistently ordered records across pages, especially when data changes while a consumer iterates through results.
Failure explanation
A paginated endpoint omits, duplicates, reorders, or inconsistently counts records as a consumer traverses pages. Offset pagination can skip or repeat rows when records are inserted or deleted between requests. Cursor pagination can fail when tokens expire, are reused incorrectly, or do not preserve sort order. Incorrect total counts and ambiguous next-page indicators also make consumers stop too early or request pages forever.
Example
A client requests GET /orders?limit=2&offset=0 and receives orders A and B. A new order is inserted at the beginning. The next request with offset 2 returns B and C, duplicating B and omitting a later record.
How to test
- Test empty, first, middle, and final pages; zero, negative, and excessive limits.
- Change the dataset between page requests.
- Verify stable ordering, cursor integrity, token expiration, and termination.
- Compare the concatenated result with the expected dataset.
Expected behavior
Pagination semantics, ordering guarantees, cursor behavior, and count fields match the documented contract. Consumers can traverse the intended result set without unexplained omissions or duplicates.
Runnable examples
- FM-003-01 pagination-contract
- FM-003-02 page-overflow
- FM-003-03 page-offset
- FM-003-04 missing-pagination-meta
Each example includes a broken server, a fixed server, an OpenAPI spec, and a clrsig scenario that detects the failure.
Learn how to find and fix it
In the field