Add pagination and filtering to list endpoints that return everything
Endpoints that return the whole table, given pagination and filtering before the table gets large.
The ticket
Add pagination and filtering to list endpoints that currently return every row.
Acceptance criteria
- Pagination follows the project's existing convention
- Tests cover the first page, the last page, and an empty result
- Filtering is validated and cannot be used to scan the whole table
- Existing consumers keep working, through a default or a version
What lands as proof
Contract tests at the boundaries, which is where off-by-one pagination bugs actually live.
Why teams defer it
- It is fast while the table is small, and the table is small right up until it is not.
- Adding pagination is a breaking change for anybody who assumed they got everything.
Questions
- What does the agent actually change?
- The ticket is scoped to one outcome: add pagination and filtering to list endpoints that currently return every row. Work that serves that outcome is in scope, and anything outside it is left for a separate ticket, so the pull request stays reviewable.
- How do I know the work is done?
- The pull request carries the evidence, not only the diff. Here that means contract tests at the page boundaries and on the empty page, so a reviewer can confirm the result without reproducing the work locally.
- How much oversight does this need?
- The run stops once the plan is written. Somebody reads the approach and approves it before any code exists, which is the cheapest moment to redirect the work.