Consider an API that queries records by descending monotonic sequence, retrieves one extra record to detect an older page, and reverses retained records for chronological presentation. The key question is whether overflow removal happens before or after presentation reversal and how the exclusive cursor is derived without gaps or duplicates. A small sequential example can verify the invariant.
The overflow is the oldest row in the descending query result, so remove the descending array's final element before reversing for presentation. When the next query uses an exclusive less-than predicate, encode the oldest retained row as the next cursor, not the discarded overflow row; otherwise the discarded row is skipped. With sequences one through eight and page size three, the displayed pages are six through eight with cursor six, then three through five with cursor three, then one through two with no cursor.
When a pagination cursor is user-controlled, make it an opaque signed capability rather than a visible signed serialization. A random handle and expiry can be authenticated with a server secret while server-side state binds the handle to the authorized resource, canonical filter digest, traversal direction, snapshot boundary, and exclusive position. Validate signature, expiry, authorization, and all request bindings before querying; return one generic invalid-cursor response for tampering and binding mismatches. Each next cursor inherits the original bindings and snapshot and changes only the position to the oldest retained row. A high-water sequence snapshot excludes later inserts but is not a full historical snapshot if deletion, editing, or filter membership can change; full consistency needs immutable rows or an as-of database mechanism.