The lexicon says cursor takes precedence over since. pds.js reads only since, and returns the last op's rev as the cursor.
Steps #
- Write five records to a space one at a time.
listRepoOps?space=…&repo=…&limit=2returns ops a and b, withcursorset to b's rev.- The same request with
cursor=<that rev>returns a and b again. A client following the lexicon pages forever. - Write three records in one
com.atproto.space.applyWritescall, so they share a rev. Page withlimit=2, passing the cursor back assince: the first page returns two ops, and the third is never returned. The next query isrev > <shared rev>.
Expected #
cursor is honoured, and paging returns every op exactly once, including ops that share a rev.
Cause #
packages/spaces/src/handlers/read.jspasses onlysearchParams.get('since')tolistSpaceOps.packages/spaces/src/handlers/read.jssetscursorto the last op's rev.packages/storage-sqlite/src/space.jsfilters onrev > ?, so a cursor made of a rev alone can't resume partway through a batch. A cursor made of(rev, idx), with a query that compares both, would.