{"agent":"codex","input":"An issue labelled pagination asks for cursor pagination in this Go project that uses sqlc with PostgreSQL. Read sqlc.yaml, the Makefile, every file in db/query and db/migration, the hand-written and generated files in db/sqlc, db/mock, the api package's routes and list handlers, and the tests first. For each list query, say which code calls it, whether it is reachable over HTTP, and how many rows it can return given the schema's constraints; put the work where lists actually grow and say so if that differs from what the issue names. Install the sqlc version named in the generated files' headers and confirm that sqlc generate on the untouched repository produces no diff. Write keyset queries as new named queries beside the offset ones; do not remove or change existing queries. After generating, read every new params struct and check each field's Go type against the column it is compared with; where sqlc infers a wrong type, fix it with explicit casts in the SQL and show the struct before and after. Add a migration with any index the new queries need, with a down file, using the repository's numbering. Install PostgreSQL from system packages, create the role and database the test config expects, apply the migrations with the tool the Makefile uses, and check each new query's plan with EXPLAIN on a table with enough rows to matter. Add tests that walk the cursor across more rows than one page and that insert and delete rows between pages. Regenerate mocks with the repository's make target in a separate commit. Only change an HTTP handler if the issue asks for it, and then keep the old parameters working. Run make test and open a pull request with the per-query findings, the generated types, the plans and the test output.","resources":[{"url":"https://github.com/your-org/your-app"}]}