Repository navigation
ci: dispatched Queue reports only on open main PR heads - #9692
Conversation
Quest-Claim: 60db66315c5ba5d2
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. WalkthroughManual dispatches now require a full commit SHA that matches the head of an open pull request targeting Merge Risk:
|
Problem
gh workflow run queue-pr.yml -f sha=<sha>posted a skippedQueuecheck on any commit. Dispatched on a merge group's commit by mistake, that skippedQueuewould pass the group before its build reports.Approach
main(pulls?state=open&base=main, paginated) and requires one whose head is$SHA; otherwise it exits non-zero with an::error::and posts nothing. The job gainspull-requests: read.sh/gh/queue.test.tsruns the step against a stubgh(answering the listing through the step's own--jqfilter) and asserts it posts for an open main PR head and refuses any other commit.Choice made without asking (deviates from the quest's Plan): the Plan named
gh api repos/$REPO/commits/$SHA/pulls, but that endpoint returns nothing for an open fork PR's head (checked on #9688), which would refuse exactly the fork PRs a dispatch exists to fix. Listing open PRs intomaincovers forks, and closed PRs and other bases drop out server-side. Cost: one page per 100 open PRs (one call today, 45 open).Impact
Validation
bun sh/gh/queue.test.tspasses; with the guard line removed it fails on the non-PR commit (mutation check).just checkpasses.4fba5dfthe run failed with4fba5df... is not the head of an open pull request into mainand posted noQueuethere (https://github.com/moq-dev/moq/actions/runs/45868976690); on this PR's head it posted the skippedQueue(https://github.com/moq-dev/moq/actions/runs/45868981198).Alternatives
commits/$SHA/pullsper the Plan: rejected, misses fork PRs (above).Follow-ups
None.
Models
Size: XS
Implementer: Claude Code, claude-opus-5-5, unknown (arm B)
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: 6ba0f95
Base: origin/main at 4fba5df
Risk: high,
it changes .github/workflows/queue-pr.yml, which is always high: workflows run with the repository's secretsClassified: high by the always-high paths
Risk file: bb7b1c0de60b
Reviewer: Codex, gpt-6.2-sol, low effort
Session:
01a218ef-381f-7b23-9e25-1b4233a12860, round 1Score: 9/10,
The review found no blockers by inspection and verified that dispatch requires a matching open PR targeting main before posting the skipped Queue check, but did not run tests.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none
Reviewer: Claude Code, claude-opus-5-5, medium effort, second
Session:
11645ea5-65f5-46c1-ad84-19c39cf1e2c4, round 1Score: 9/10,
The change is small and correct: a dispatch now posts a skipped `Queue` only on the head of an open PR into main, so a merge group commit can no longer pass before its build reports. Only notes remain.Rounds: 1; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none
Notes, the author's to take or leave:
sh/gh/queue.test.ts:134:Test stub runs the --jq filter through system jq, not gh's built-in gojqsh/gh/queue.test.ts:141:No test pins the open/base=main filter on the PR listing