An AT Protocol Personal Data Server written in JavaScript pdsjs.dev

com.atproto.space.listRepoOps ignores cursor, and pages that end inside a batch drop ops #5

Open trezy.codes
Open opened by trezy.codes

The lexicon says cursor takes precedence over since. pds.js reads only since, and returns the last op's rev as the cursor.

Steps #

  1. Write five records to a space one at a time.
  2. listRepoOps?space=…&repo=…&limit=2 returns ops a and b, with cursor set to b's rev.
  3. The same request with cursor=<that rev> returns a and b again. A client following the lexicon pages forever.
  4. Write three records in one com.atproto.space.applyWrites call, so they share a rev. Page with limit=2, passing the cursor back as since: the first page returns two ops, and the third is never returned. The next query is rev > <shared rev>.

Expected #

cursor is honoured, and paging returns every op exactly once, including ops that share a rev.

Cause #

Sign up or Sign in to add to the discussion.