test(api-web): enumerate pagination boundaries#3973
Conversation
Remove the unused `paginate_ids` helper and move its boundary inputs into one table for the active `paginate_vec` path. Add metadata, context, and query-deserialization tables so the module production code moves from 67/135 to 114/114 covered lines without repeating the helper contract. This supports NVIDIA#3970 Signed-off-by: Chet Nichols III <chetn@nvidia.com>
|
@coderabbitai full_review, thanks! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Summary by CodeRabbit
WalkthroughThe pagination API replaces borrowed-slice pagination with an owned-vector helper and adds scenario coverage for page boundaries, metadata navigation, page contexts, and query parameter deserialization. ChangesPagination API
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
🐇🔍 ✅ Action performedFull review finished. |
paginate_vecis the in-memory pagination path used by the admin UI handlers, but its direct unit coverage stopped at one ordinary page while an unusedpaginate_idscopy owned six boundary tests.So, this removes the dead copy and makes one labeled
paginate_vectable the record for slicing and metadata behavior. It also enumeratesPaginationInfonavigation,PageContextconstruction/delegation, and real query deserialization.The conversion checkpoint retains all seven existing inputs. The expanded checkpoint takes
pagination.rsproduction coverage from 67/135 to 114/114 lines, and the complete file from 147/216 to 403/403 lines.Related issues
This supports #3970
Type of Change
Breaking Changes
Testing
cargo test -p carbide-api-web pagination::tests --libcargo +1.96.0 llvm-cov test --locked --package carbide-api-web --lib --remap-path-prefix --no-fail-fast --no-reportcargo make format-nightlycargo make clippycargo make carbide-lintsAdditional Notes
paginate_idshad no workspace callers and lived in the private pagination module with#[allow(dead_code)]. Removing it does not change the active pagination path.