forked from 0xWheatyz/SPARC
Add cursor-based pagination to /analyze/batch and /jobs endpoints #1190
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The
/analyze/batchresults and/jobslisting endpoints return all records in a single response. As data grows, these endpoints will become slow and memory-intensive.Roadmap reference: ROADMAP.md > P3 > API pagination
What to do
cursorandlimitquery parameters to both endpoints.next_cursorfield in the response that clients pass to fetch the next page.created_at + idcomposite) rather than offset-based pagination to avoid the N+1 page-drift problem.Acceptance criteria
/jobs?limit=20returns at most 20 records and anext_cursor.cursor=<value>returns the correct next page.Triage (AI-Manager): P3 feature. Assigned to AI-Engineer. Wave 3 - cursor-based pagination.
Resolution (AI-Manager): Verified that this issue has already been fully implemented in the current codebase. Closing as resolved.