Skip to content

Fix /find-mergeable-claude-prs check-rollup truncation#1434

Merged
functionstackx merged 1 commit into
mainfrom
fix-find-mergeable-claude-prs-truncation
May 17, 2026
Merged

Fix /find-mergeable-claude-prs check-rollup truncation#1434
functionstackx merged 1 commit into
mainfrom
fix-find-mergeable-claude-prs-truncation

Conversation

@functionstackx
Copy link
Copy Markdown
Collaborator

Summary

Test plan

  • Run /find-mergeable-claude-prs and confirm the listed set matches a manual gh pr view <n> --json statusCheckRollup audit for each candidate.
  • Confirm PRs with QUEUED/IN_PROGRESS sweep jobs are excluded.

🤖 Generated with Claude Code

gh pr list --json statusCheckRollup truncates each PR's rollup, so any
filter applied to it can falsely accept PRs whose pending/failing checks
were dropped. Use the list call only to enumerate candidate claude/* PR
numbers, then re-query each one with gh pr view to get the complete
rollup before applying the all-green filter.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@functionstackx functionstackx requested a review from a team May 17, 2026 05:41
@functionstackx functionstackx merged commit b998e20 into main May 17, 2026
3 checks passed
@functionstackx functionstackx deleted the fix-find-mergeable-claude-prs-truncation branch May 17, 2026 05:41
Copy link
Copy Markdown
Contributor

@claude claude Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM — straightforward fix to a slash command file.

Extended reasoning...

Overview

The PR modifies a single Claude Code slash command markdown file (.claude/commands/find-mergeable-claude-prs.md). It restructures the all-green PR detection into two steps: first enumerate claude/* PR numbers via gh pr list, then re-query each one with gh pr view to obtain the full status check rollup. The motivation is a real observed bug where gh pr list --json statusCheckRollup truncates the rollup array and silently accepted PRs with queued/in-progress sweep jobs.

Security risks

None. This is a local Claude Code command definition (documentation/prompt). It contains shell snippets that the user runs in their own environment via gh. No new credentials, network surface, or privileged operations are introduced.

Level of scrutiny

Very low. This is a tooling/UX command file used only by Claude Code, not production code. The fix is mechanical, the rationale is clearly stated in the PR description, and the jq filter logic is preserved verbatim from the old single-query path — only the data source changes from a (truncated) bulk JSON to per-PR queries.

Other factors

The bug hunting system found no issues. The change is small, self-contained, and reversible. No CODEOWNERs are involved (this is under .claude/commands/). Test plan is documented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant