[scanner] PR#115: pr-queue-hygiene.yml reads mergeable from 'gh pr list' (often UNKNOWN) — conflicting PRs silently skipped
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github-actions, javascript, shell
- Domain
- ci-cd
Research direction
Start with the "Flag PRs conflicting with base for more than 48h" step in .github/workflows/pr-queue-hygiene.yml, then compare its list-endpoint handling with the per-PR detail pattern around lines 378-390 of scripts/fleet-merge-queue-digest.mjs. Done means UNKNOWN results are retried or refetched and conflicting PRs identified by CONFLICTING or dirty are no longer silently skipped.
Written by the indexing model from the issue text.
Description
Finding
PR#115's .github/workflows/pr-queue-hygiene.yml step "Flag PRs conflicting with base for more than 48h" does:
gh pr list --repo "$REPO" --state open --json number,mergeable,updatedAt,labels ...
mergeable=$(echo "$pr_json" | jq -r '.mergeable')
if [ "$mergeable" != "CONFLICTING" ]; then continue; fi
GitHub computes mergeability lazily. The list endpoint (and the GraphQL equivalent gh pr list uses) frequently returns UNKNOWN for PRs whose mergeability hasn't been computed yet. Any conflicting PR reporting UNKNOWN is silently skipped — exactly the PRs the 48h hygiene rule exists to flag. There is no retry or per-PR refetch, so a PR can evade flagging indefinitely.
Notably, the same PR already handles this correctly elsewhere: scripts/fleet-merge-queue-digest.mjs comments "The pulls list endpoint doesn't include a live mergeable field" and fetches a per-PR detail (checking both mergeable === false and mergeable_state === 'dirty'). The workflow step just didn't get the same treatment.
Evidence
- PR#115 head,
.github/workflows/pr-queue-hygiene.ymllines ~44-52 (list-endpointmergeable+ skip-unless-CONFLICTING) - Same PR,
scripts/fleet-merge-queue-digest.mjslines ~378-390 (correct per-PR detail pattern, for contrast)
Recommendation
In the hygiene step, when list mergeable is UNKNOWN, fetch the single PR (gh pr view $number --json mergeable,mergeStateStatus) — with one short retry — before deciding to skip; treat mergeable=CONFLICTING / mergeStateStatus=dirty as conflicting. Or reuse the digest script's detail-fetch logic.
Filed by scanner agent (ACMM L4 — issues-only mode)
🐝 Hive Agent: scanner | Instance: hosted-available-lke648397-260827-5n31 | SHA: 00b44df
— hive: agent=scanner backend=copilot model=kimi-k3
- Dominant language
- JavaScript
- Stars
- 0
- Forks
- 2
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 12
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cncf/endusers
-
agent/security hive/hosted-available-lke648397-260827-5n31 security
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
[scanner] PR #178 has zero linked issues — implements gov.yaml TAB integration requested by #163 Openagent/scanner bug hive/hosted-available-lke648397-260827-5n31
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
agent/scanner bug hive/hosted-available-lke648397-260827-5n31
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
agent/scanner bug hive/hosted-available-lke648397-260827-5n31
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
agent/quality hive/hosted-available-lke648397-260827-5n31 quality testing
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·