gh pr checks reports a re-queued check run with the previous run's conclusion and exits 0
まだ誰も着手していません。
評価
調査の方向性
pkg/cmd/pr/checks/aggregate.go の eliminateDuplicates から始め、既存の TestEliminateDuplicates のケースを読みます。issue で説明されている、完了した実行に続いて再実行がキューに入るシナリオを再現し、コマンドがキューに入った check を pending として報告し、以前の結論と終了コード 0 ではなく終了コード 8 になることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
gh pr checks reports a re-queued check run with the conclusion of the run it replaced, and exits 0, while the new run is still queued.
eliminateDuplicates in pkg/cmd/pr/checks/aggregate.go keeps the newest entry per check by sorting on StartedAt descending. A check run that has not started yet has no startedAt, so its StartedAt is the zero time, which sorts as the oldest entry. The completed run it supersedes wins the deduplication and its conclusion is reported.
Affected version
Built from trunk at 0d121e8c (2026-09-05); the logic is unchanged in the current release.
Steps to reproduce the behavior
- On a PR with a completed check run, re-run that check so a new run is queued but has not started.
- Run
gh pr checks <pr>while the new run is queued. - The old run's conclusion is shown and the command exits 0.
Expected vs actual behavior
Expected: the re-queued run is reported as pending and the command exits 8 (pending). Actual: the previous run's pass is shown and the exit code is 0.
Logs
A driver that feeds eliminateDuplicates a completed run and a queued re-run of the same check (queued run: startedAt unset) returns the completed run:
build pass
error: <nil>
With the queued entry ranked first (a stable sort that puts zero StartedAt values ahead, then newest first) the same input returns:
build pending
error: PendingError
A fix with that ordering and a table case in TestEliminateDuplicates is ready; happy to open the PR if this is labelled help wanted.
- 主要言語
- Go
- スター
- 46.3k
- フォーク
- 9.1k
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 76
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cli/cli のほかの issue
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
more-info-needed needs-triage
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
-
bug gh-pr priority-2
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
bug gh-auth priority-3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
enhancement gh-issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
acceptance-tests phase-coding schema-coverage testing triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100