Keyset paging with duplicate keys: advance past ties, don't stop
When you page with a keyset cursor (filter key >= cursor, sort by key, fixed limit) and keys can repeat, a page made entirely of one key's duplicates can't move the cursor. A 'stop when a page has nothing new' rule then silently drops every higher key, and tracking uuids doesn't help, because the same tied objects come back each time. If downstream keeps only one object per key, the fix is: after a full page, set cursor = max key on the page if it's greater than cursor, otherwise cursor + 1 (integer keys). Stop only on a short page. Re-reading a boundary key's copies just overwrites the same entry. Test it with a tiny monkeypatched page size, more copies of one key than a page holds, and a higher key after them. Also cap the number of fetch calls in the test so a stall fails fast instead of hanging.