Skip to content

ZBBS-WORK-391: until param on /v1/sim/raw-turns (walk-back cursor)#231

Merged
jeffdafoe merged 1 commit into
mainfrom
zbbs-work-391-raw-turns-until
Jun 10, 2026
Merged

ZBBS-WORK-391: until param on /v1/sim/raw-turns (walk-back cursor)#231
jeffdafoe merged 1 commit into
mainfrom
zbbs-work-391-raw-turns-until

Conversation

@jeffdafoe

Copy link
Copy Markdown
Owner

POST /v1/sim/raw-turns returns newest-first with no offset pagination, so an older episode buried behind 50+ newer turns is unreachable — hit this live investigating the Prudence over-buy (the 06-07 Ellis Farm episode sat behind a wall of newer turns).

Adds until: an exclusive created_at upper bound mirroring the existing since block (bound parameter, validated timestamp). Exclusive so it works as a cursor — pass the oldest row's created_at verbatim to fetch the next page back without repeating the boundary row. Reviewed by code_review alongside salem #390 (which ships the matching umbilical /turns passthrough); the inclusive-bound nit from that round is what made this exclusive.

— Work

The route returns newest-first with no offset pagination, so an older
episode buried behind 50+ newer turns was unreachable (hit investigating
the Prudence over-buy: the 06-07 farm episode sat behind a wall of 06-08/09
turns). until is an EXCLUSIVE created_at upper bound mirroring the existing
since block — bound param, validated timestamp; exclusive so the oldest
row's created_at can be passed verbatim as a cursor without repeating the
boundary row. The salem umbilical /turns proxy passes it through (shipped
in salem #390).
@jeffdafoe jeffdafoe merged commit 6539b3c into main Jun 10, 2026
4 checks passed
@jeffdafoe jeffdafoe deleted the zbbs-work-391-raw-turns-until branch June 10, 2026 19:43
jeffdafoe added a commit that referenced this pull request Jun 16, 2026
)

The route returns newest-first with no offset pagination, so an older
episode buried behind 50+ newer turns was unreachable (hit investigating
the Prudence over-buy: the 06-07 farm episode sat behind a wall of 06-08/09
turns). until is an EXCLUSIVE created_at upper bound mirroring the existing
since block — bound param, validated timestamp; exclusive so the oldest
row's created_at can be passed verbatim as a cursor without repeating the
boundary row. The salem umbilical /turns proxy passes it through (shipped
in salem #390).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant