ZBBS-WORK-391: until param on /v1/sim/raw-turns (walk-back cursor)#231
Merged
Conversation
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
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 exclusivecreated_atupper bound mirroring the existingsinceblock (bound parameter, validated timestamp). Exclusive so it works as a cursor — pass the oldest row'screated_atverbatim to fetch the next page back without repeating the boundary row. Reviewed by code_review alongside salem #390 (which ships the matching umbilical/turnspassthrough); the inclusive-bound nit from that round is what made this exclusive.— Work