Skip to content

Validate review pagination before yielding page records - #98

Open
Vansh190804 wants to merge 2 commits into
prooflinedev:mainfrom
Vansh190804-labs:fix/review-pagination-validation
Open

Vansh190804 wants to merge 2 commits into
prooflinedev:mainfrom
Vansh190804-labs:fix/review-pagination-validation

Conversation

@Vansh190804

Copy link
Copy Markdown

Problem:
Review pagination currently validates each page's cursor after yielding its records. A caller can process records from an invalid page before receiving an error, or miss that error entirely if it stops after one result. A repeated cursor can also expose duplicate records.

Change:
Move the existing cursor validation before yielding records in both clients. Keep the existing validation rules and error types. Earlier valid pages are unaffected; invalid pages yield no records.

Tests:
Eight new regression tests fail on the original code and pass with the fix. The full repository checks passed 227 tests plus 8 subtests, along with lint, formatting, type checks and package-install smoke tests. Tests use synthetic data.

AI assistance:
AI helped identify the issue, prepare the fix and tests, and run verification. A real Proofline review has not been run yet. Its feedback will be evaluated separately for the application.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant