fix(host-service): drain check and thread pagination before grading a PR
What & why
getPullRequestDetail fetched reviewThreads(first: 100) and statusCheckRollup.contexts(first: 100) with no cursor. A PR with more than 100 checks or threads got a partial page, so a failing required check or an open thread past the first page was never seen — the mobile PR card could read "Ready to Merge" and offer the button on incomplete data (SUPER-1914, from CodeRabbit's review of #6491).
Both connections now request pageInfo { hasNextPage endCursor } and are drained to exhaustion (drainReviewThreads / drainCheckContexts, run concurrently) before checks are graded or unresolved threads counted. Nothing changes for PRs within one page — no extra requests. The 20-node caps on reviews/review-requests stay, per the ticket's accepted-risk note.
Closes SUPER-1914.
How I tested it
- host-service typecheck clean; full host-service suite green on the combined branch (1,222 tests)
- Response shape unchanged — no client changes needed (desktop and mobile consume the same fields)
Summary by cubic
Drains GitHub review thread and status-check pagination in host-service before grading PR readiness. Old behavior: only the first 100 items were considered; new behavior: drains all pages (capped at 20) and fails with CONFLICT if a page is missing, the cap is hit, or GitHub reports a next page without a cursor. Addresses SUPER-1914.
- Adds pageInfo to the base query and drains via drainReviewThreads and drainCheckContexts, run concurrently in getPullRequestDetail.
- Response shape unchanged; no client changes required.
- Keeps the 20-node caps on latestOpinionatedReviews and reviewRequests.
Summary by CodeRabbit
- Improvements
- Pull request details continue to include review threads and status checks beyond the first 100 results.
- Pagination is now handled more reliably for large pull requests, helping prevent incomplete review and verification information.
- Pull request details clearly report when available review or check data cannot be fully loaded.
- Combined review and check results remain consistently available in the pull request details view.