Support update-boundary paging across forked thread histories (#59793)

## Why

Item reads with an update boundary previously rejected forked thread histories and only supported an exclusive lower bound on update ordinals.

## What changed

- Add `before_updated_at_ordinal` as an exclusive upper bound, mutually exclusive with `after_updated_at_ordinal`.
- Allow update-filtered and update-ordered item reads across parent and child segments, applying segment bounds and preserving cursor pagination in both directions.
- Require an update boundary for update-order sorting and reject either boundary when using an item anchor or item-ID filtering.

## Testing

Extend thread-store tests to cover upper-bound filtering, descending cursor pagination, forward and backward paging across forked lineages, mutually exclusive boundaries, and ordinals outside SQLite's integer range.

GitOrigin-RevId: 63f7e18fb24a89a41ff8e570cf65963622519a25
This commit is contained in:
Owen Lin
2026-11-06 02:21:38 +00:00
committed by copyberry
parent a6ed292aa3
commit 2f02d8461d
7 changed files with 299 additions and 117 deletions
+1
View File
@@ -138,6 +138,7 @@ mod tests {
sort_direction: SortDirection::Asc,
sort_key: ItemSortKey::CreatedAtOrdinal,
after_updated_at_ordinal: None,
before_updated_at_ordinal: None,
})
.await
.expect_err("default list_items should be unsupported");