Skip to content

Fix /find-mergeable-claude-prs empty-conclusion bypass#1435

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

Fix /find-mergeable-claude-prs empty-conclusion bypass#1435
functionstackx merged 1 commit into
mainfrom
fix-find-mergeable-claude-prs-empty-conclusion

Conversation

@functionstackx
Copy link
Copy Markdown
Collaborator

Summary

  • gh returns conclusion: "" (empty string, not null) for QUEUED / IN_PROGRESS checks, so jq's // operator did not fall through to .status — the filter saw "" and never matched the pending-status guard.
  • Net effect: PRs with sweeps still running were silently reported as all-green. Observed today on PR Update qwen3.5-bf16-b300-sglang and -mtp SGLang image to v0.5.12-cu130 #1422 (48 still-running sweep jobs falsely passing the filter).
  • Fix: define a state jq helper that treats empty conclusion as missing and falls back to .status, and apply it wherever the effective check state is consulted.

Test plan

  • Run /find-mergeable-claude-prs and confirm PRs with QUEUED/IN_PROGRESS sweep jobs are excluded.
  • Spot-check a PR that is genuinely all-green to confirm it's still included.

🤖 Generated with Claude Code

gh returns conclusion="" (empty string, not null) for in-flight checks,
so the previous `(.conclusion // .status)` fell through only when
conclusion was null and silently returned "" for QUEUED/IN_PROGRESS
checks. Those empty strings then never matched the pending-status guard,
so PRs with sweeps still running were falsely reported as all-green.

Define a `state` helper that treats empty conclusion as missing and
falls back to .status, and apply it everywhere the effective check
state is consulted.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@functionstackx functionstackx requested a review from a team May 17, 2026 06:39
@functionstackx functionstackx merged commit ebe7f9e into main May 17, 2026
@functionstackx functionstackx deleted the fix-find-mergeable-claude-prs-empty-conclusion branch May 17, 2026 06:39
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, correct jq fix — // only falls through on null, not empty string, so the explicit non-empty check is the right call.

Extended reasoning...

Overview

This PR makes a one-file change to .claude/commands/find-mergeable-claude-prs.md, a markdown-based slash command. It introduces a state jq helper that treats an empty-string .conclusion as missing and falls back to .status, replacing the previous (.conclusion // .status) expression in the two places it was used.

Security risks

None. This is a slash command definition file consumed by Claude Code locally; it has no impact on production code, auth, or shared infrastructure. The change is purely a logic correction inside a jq expression.

Level of scrutiny

Low. The change is small, self-contained, and the bug being fixed is well-understood: jq's // operator only short-circuits on null and false, so "" // .status evaluates to "" rather than falling through. The new helper if (.conclusion // "") != "" then .conclusion else .status end correctly normalizes both null and "" to the status fallback, and it's applied consistently to both call sites.

Other factors

The bug hunting system found no issues. The PR description includes a concrete observed failure (PR #1422 with 48 still-running sweeps falsely passing) and a sensible manual test plan. No prior reviewer comments in the timeline. Straightforward approve.

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