fix: score CI from the latest Actions workflow run - #4
Merged
Merged
Conversation
GitHub's statusCheckRollup keeps a cancelled Verify run's gate FAILURE on the SHA after a new run starts, even before that run posts gate. Score the latest run per workflow, then the latest check of each name, so a still-running rerun shows pending instead of the stale red.
Owner
Author
|
@coderabbitai review |
shayan-ys
marked this pull request as ready for review
September 28, 2026 18:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📝 Summary
This PR changes the CI badge so it follows the latest GitHub Actions run of each workflow, then the latest check of each name. GitHub's
statusCheckRollupkeeps a cancelled workflow'sVerify / gateFAILURE on the SHA after a new run starts, even before that run has posted gate, so DevDash showed red while CI was still in progress.🛠️ Type of Change
🔍 Changes Made
checkSuite.workflowRun(id, createdAt, workflow name) on each CheckRun, with a GraphQL fallback when those fields are missing.latest_contextskeeps only checks from the latest Actions run per workflow, then the newest run of each remaining check name.🧪 How to Test
git checkout fix/ci-latest-workflow-runuv run pytestVerify / gateyet).●ciN) instead of red from the cancelled run's gate.✅ Review and verification
uv run pytest— 59 passed.gh pr checks 4— all 6testjobs SUCCESS on34d9fc2. Live getmash/mash-2-point-o#833 scored●ci1(Verify / ios / compile in progress) instead of red from the cancelled Verify gate.@coderabbitai reviewand posted no commit status, review, or comment after 30 minutes (same as PRs fix: score CI from the latest run of each check name #2 and Add omp profile selection and a GitHub account flag #3 on this repo)