Review Finding: 3b — MEDIUM
The cursor-based pagination re-sorts by createdAt after fetching by indexed_at:
// Fetch extra records to allow for re-sorting by createdAt
fetchLimit := first * 2
Over-fetching by 2x doesn't guarantee correctness — records could span page boundaries unpredictably. Requesting 20 records, fetching 50 and re-sorting can still miss records or produce duplicates.
Fix
Consider keyset pagination using (indexed_at, uri) composite cursor for deterministic, gap-free pagination.
From codebase review §3b
Review Finding: 3b — MEDIUM
The cursor-based pagination re-sorts by
createdAtafter fetching byindexed_at:Over-fetching by 2x doesn't guarantee correctness — records could span page boundaries unpredictably. Requesting 20 records, fetching 50 and re-sorting can still miss records or produce duplicates.
Fix
Consider keyset pagination using
(indexed_at, uri)composite cursor for deterministic, gap-free pagination.From codebase review §3b