chadtmiller.com/group-host
atmosphere group host
0
0
A list's last page names no cursor, never null
Merged Approved
This adds api::paged, which sets cursor only when there is a next page. It replaces "cursor": cursor in all nine list methods the pull names. A search of src on the head finds no other "cursor": <Option> writes. The remaining out["cursor"] = ... sites are already conditional. The internal readers (import.rs, index.rs, account_move.rs) use page["cursor"].as_str(), which gives None whether the key is null or absent, so the change doesn't affect them. The tests that asserted null now assert the key is absent, and the changeset is included. Nothing needs to change.
All checks have passed
8 passed, 1 skipped
Merged as 2189b94
The last page of nine list methods answered
"cursor": null, which the lexicons'cursor(a string) doesn't allow, so a client that checks answers against them, as@atproto/lexdoes, refused the page. Now the last page leavescursorout.Claude Opus 5.5
What changes
The last page of a list names no cursor.
api::pagedputscursorbeside a page only when there is a next one. It answers forcom.atproto.repo.listRecords,com.atproto.sync.listReposandlistBlobs,com.atproto.space.listRecords,listRepoOpsandlistBlobs,org.atgrp.listJoinRequests,org.atgrp.internal.listInvitesandorg.atgrp.internal.listSpaceRecords, which each wrote"cursor": cursorfrom anOption. The lists that already left it out (listWriters,listMembers,getActorGroups, the moderation queue and histories) are unchanged.Why
An app signed in as a group, calling
org.atgrp.listJoinRequeststhrough@atproto/lex'sClient, gotInvalid response payload: Expected string value type (got null) at $.cursor, as would any validating client of any of these lists. Leaving the key out is what the reference PDS does, and what the host's own other lists already did.How it was checked
blobs,index,joining,invites,spaces,repos,interop,authority) pass. Three asserted"cursor": nullon a last page, and now assert it is absent; the rest read["cursor"], which isNulleither way.@atproto/lexover a local host:listJoinRequestsrefused before, and lists the request after.pagedtakes both paths in the tests above.Shortcomings