Skip to content

Read the state marker and PR lists without result limits#48

Open
Phlogistique wants to merge 1 commit into
mainfrom
claude/pr-list-limit-3njvdx
Open

Read the state marker and PR lists without result limits#48
Phlogistique wants to merge 1 commit into
mainfrom
claude/pr-list-limit-3njvdx

Conversation

@Phlogistique

@Phlogistique Phlogistique commented Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Reworked from the original "raise the limit to 100", which only traded one arbitrary cutoff for another.

The real problem was the state-marker read: gh pr view --json comments returns the first 100 comments, so on a busy PR the marker could fall outside the window and the resume would give up. read_state_marker now uses gh api graphql --paginate — gh walks the cursor itself via $endCursor/pageInfo — filtered to our own comments (viewerDidAuthor), keeping the last marker. Every comment is seen, no hand-rolled loop.

The two gh pr list calls had the same shape of problem at their default limit of 30 (silently truncated fan-out; a missed conflicted sibling letting the shared base branch be deleted), so they now go through gh api --paginate too.

GITHUB_REPOSITORY (always set in Actions) is now required in conflict-resolved mode, since GraphQL has no {owner}/{repo} placeholder support.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JHvKryT4QUpHYdNq9YEQxX

@github-actions github-actions Bot changed the base branch from claude/pr-number-addressing-3njvdx to main June 11, 2026 11:22
@Phlogistique Phlogistique force-pushed the claude/pr-list-limit-3njvdx branch from b9fe14d to aaa135a Compare June 11, 2026 13:10
@Phlogistique Phlogistique changed the title Raise gh pr list limit to 100 Read the state marker and PR lists without result limits Jun 11, 2026
gh pr view --json comments returns the first 100 comments, so on a
busy PR the state marker could fall outside the window and the resume
would give up. Read the comments through gh api graphql --paginate,
which walks every page, and keep the last marker among our own
comments.

The two gh pr list calls had the same shape of problem at their default
limit of 30: a silently truncated fan-out, or a missed conflicted
sibling letting the shared base branch be deleted. List pulls through
gh api --paginate so every page is read.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01JHvKryT4QUpHYdNq9YEQxX
@Phlogistique Phlogistique force-pushed the claude/pr-list-limit-3njvdx branch from aaa135a to b8aa527 Compare June 11, 2026 13:13
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.

2 participants