Skip to content

fix(ce-resolve-pr-feedback): paginate GraphQL connections#807

Merged
tmchow merged 1 commit intomainfrom
tmchow/ce-debug-issue-798
May 8, 2026
Merged

fix(ce-resolve-pr-feedback): paginate GraphQL connections#807
tmchow merged 1 commit intomainfrom
tmchow/ce-debug-issue-798

Conversation

@tmchow
Copy link
Copy Markdown
Collaborator

@tmchow tmchow commented May 8, 2026

On long-lived PRs that accumulated more than one page of review threads, ce-resolve-pr-feedback silently dropped everything past page 1 of each GraphQL connection and reported "0 of 0 resolved" while real findings sat unanswered. The two GraphQL fetch scripts now paginate so the resolver sees every unresolved thread regardless of PR length.

gh api graphql --paginate follows only one pageInfo per response, so get-pr-comments issues three separate paginated queries (reviewThreads, comments, reviews) and assembles the result before running the existing filter. The inline per-thread comment cap is also bumped from 10 to 100, without follow-up pagination — threads exceeding 100 comments are rare and out of scope here. get-thread-for-comment paginates reviewThreads the same way.

A new tests/resolve-pr-feedback-pagination.test.ts enforces the contract: each top-level connection is paginated with after: $endCursor and selects pageInfo { hasNextPage endCursor }.

Fixes #798.


Compound Engineering
Claude Code

On long-lived PRs that accumulated more than one page of review threads,
the skill silently dropped everything past page 1 of each GraphQL
connection and reported "0 of 0 resolved" while real findings sat
unanswered.

The two GraphQL fetch scripts now paginate. `gh api graphql --paginate`
follows only one `pageInfo` per response, so `get-pr-comments` issues
three separate paginated queries (reviewThreads, comments, reviews) and
assembles the result before running the existing filter; the inline
per-thread comment cap is also bumped from 10 to 100 (without
follow-up pagination — threads exceeding that depth are rare and out
of scope here). `get-thread-for-comment` paginates reviewThreads the
same way.

A new tests/resolve-pr-feedback-pagination.test.ts enforces the
contract: each top-level connection is paginated with `after:
$endCursor` and selects `pageInfo { hasNextPage endCursor }`.

Fixes #798.
@tmchow tmchow merged commit 07a6d52 into main May 8, 2026
2 checks passed
@github-actions github-actions Bot mentioned this pull request May 8, 2026
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.

[compound-engineering] Bug: ce-resolve-pr-feedback misses threads on PRs with 50+ review threads (no GraphQL pagination)

1 participant