Skip to content

fix: score CI from the latest run of each check name - #2

Merged
shayan-ys merged 1 commit into
mainfrom
ci-latest-check-run
Sep 25, 2026
Merged

shayan-ys merged 1 commit into
mainfrom
ci-latest-check-run

Conversation

@shayan-ys

Copy link
Copy Markdown
Owner

What and why

A PR can look red in the pane while GitHub's merge box is green. statusCheckRollup keeps every check-run on the SHA. When concurrency cancels an in-progress workflow, its aggregator job still posts FAILURE (if: always()), then the surviving run posts SUCCESS. The rollup state stays FAILURE because the old run is never deleted.

The merge box and gh pr checks use the latest run of each check name. The badge now does the same, and no longer consults rollup state.

Behaviour

Situation Before After
Cancelled run failed Verify / gate, later run succeeded ✗ci ✓ci
Later rerun failed ✗ci (rollup) ✗ci1 naming the check
Rerun still in progress old result, or ✗ci from rollup ●ci

Checklist

  • uv run pytest (47 passed) and uv run ruff check . pass
  • Tests cover a superseded failure, a later failure replacing a pass, and an in-progress rerun
  • CHANGELOG.md has a line under Unreleased
  • README legend notes that the badge is the latest run of each check

GitHub's statusCheckRollup keeps every check-run on the SHA, so a
cancelled workflow's failed gate sits next to the later success and the
rollup state stays FAILURE. The PR merge box and `gh pr checks` use the
latest run of each name. Match that, and ignore the rollup state.
@shayan-ys
shayan-ys marked this pull request as ready for review September 25, 2026 16:38
@shayan-ys
shayan-ys merged commit 3e18ce8 into main Sep 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant