A page such as 9223372036854775807 passed every pagination check, so
(page-1)*pageSize wrapped around. With an even page size the offset
became negative and PostgreSQL rejected the query with "OFFSET must not
be negative"; paths that slice in memory (paginateSlice, balance history
merge) panicked with a negative slice bound. Both surfaced as HTTP 500 on
list endpoints such as /api/v1/admin/users, /api/v1/usage, /api/v1/keys
and /api/v1/admin/payment/orders.
- PaginationParams.Offset saturates Page at MaxInt/limit, so offset and
offset+limit both stay within int.
- ParsePagination clamps page the same way, which covers the repositories
that compute (page-1)*pageSize themselves.
- The prompt audit event list and the OpenAI token stats filter parse page
on their own; they now reject an overflowing page with 400, like other
invalid pagination input there.