fix: remove unsupported pagination from vehicles-for-agency#1112
fix: remove unsupported pagination from vehicles-for-agency#11123rabiii wants to merge 1 commit into
Conversation
Per the spec, this endpoint must return all matching vehicles without applying a count ceiling. Removed ParsePaginationParams and PaginateSlice calls to prevent truncation. Hardcoded limitExceeded to false in the response and added tests to verify that pagination parameters are safely ignored.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe Remove pagination from vehicles-for-agency handler
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|



Summary
Fixes a spec gap where the
vehicles-for-agencyendpoint was incorrectly applying pagination, leading to truncated results and an incorrectlimitExceededflag.Problem
The spec explicitly guarantees that this endpoint will return all matching vehicles currently tracked for the requested agency. It also states that
data.limitExceededmust always befalse. The previous implementation honoredlimitandoffsetparameters, which violated this guarantee and could cause clients to miss vehicle data.Changes
utils.ParsePaginationParamsandutils.PaginateSlicefrom the handler.limitExceededargument tofalsewhen building theListResponse.maxCountandoffsetquery parameters does not truncate the result set and thatlimitExceededremainsfalse.Closes #1105
Summary by CodeRabbit
limitExceededflag is consistently reported asfalsefor this endpoint.maxCountandoffsetno longer truncate the vehicle list returned.