ci: judge only the latest check run per name in auto-tag verify#586
Merged
Conversation
The "Verify CI checks passed" step counted EVERY check run on the merged head SHA. The check-runs API returns runs from every check suite ever started there, and label events don't move the head — so superseded red/cancelled runs (e.g. the pre-label `opened` Semver Label run) parked on the SHA forever and blocked tagging. This blocked the first v1.6.0 attempt. Fix: extract the logic into .github/scripts/verify-ci-checks.sh and collapse to the latest run per (app, name) — started_at with id as same-second tiebreak — before judging, mirroring GitHub's own merge-box collapse. The script runs standalone (read-only) against any SHA. Also: - Stage root server.json in the version-bump commit. render_server_card.py rewrites it alongside the server card, but it was missing from git add and drifted on main (bit PR #583). - Remove semver-label.yml's self-heal rerun step (added in PR #584): it existed only to flip superseded runs green for the old count-everything verify. With latest-per-name evaluation it is dead weight; dropping it also drops the actions:write permission. Validated read-only against 9ebceaa (PR #584 head, filter=all to reconstruct the pre-self-heal state): old logic refuses (stale in_progress Cloudflare Pages attempt + failed pre-label Semver Label run), new logic ignores the 3 superseded runs and passes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
claude-dataviking
requested review from
openclaw-dv and
the-data-viking
as code owners
July 18, 2026 22:23
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.
What
Fixes the auto-tag "Verify CI checks passed" step so it judges only the latest check run per (app, name) on the merged head SHA, instead of every run ever parked there. Two side fixes ride along: root
server.jsonis now staged in the version-bump commit, and semver-label.yml's self-heal rerun step is removed as redundant.Why
The check-runs API returns runs from every check suite ever started on a SHA, and label events don't move the head. So the superseded pre-label
openedrun of Semver Label (red) — and even a stalein_progressCloudflare Pages attempt — sat on the SHA forever and made verify refuse to tag. This blocked the first v1.6.0 attempt. GitHub's own merge box collapses check runs to the latest per name; verify now does the same.Changes
.github/scripts/verify-ci-checks.sh(new): the verify logic, extracted so it can be run standalone (read-only,REPO=... HEAD_SHA=... bash .github/scripts/verify-ci-checks.sh) against any SHA. Same gh api + jq style; groups by(app.slug, name), sorts bystarted_atwithidas same-second tiebreak, takes the last, then applies the unchanged incomplete/failed rules (neutral/skipped still pass; theauto-tagcheck run is still excluded so a prior failed tagging attempt can't block its own recovery rerun).auto-tag.yml: verify step now calls the script; and the bump commit'sgit addgains rootserver.json—scripts/render_server_card.pyrewrites it (two version slots) alongside the server card, but it was never staged, so it drifted on main and bit PR chore(release): pre-bump version artifacts to 1.6.0 (un-stall the release train) #583.semver-label.yml: the PR ci(semver-label): fresh-fetch labels + self-heal superseded runs; cut v1.6.0 on merge #584 self-heal step ("flip superseded non-green runs of this check green") is removed. It existed solely to appease the old count-everything verify. Required-check mergeability already uses the latest run per name natively, so nothing else needs it; removing it also drops theactions: writepermission.Validation (read-only, no release cut)
Ran old vs new logic against
9ebceaa(PR #584 head), usingfilter=allto reconstruct the pre-self-heal state:::error::1 check(s) still running(stalein_progressCloudflare Pages attempt; afailureSemver Label pre-label run sits behind it)All CI checks passedAlso validated against SynthBench PR #334 head
1550a06(old: ❌ 11 non-green; new: ✅) — same fix lands there in the sibling PR. The next natural release is the live proof; this PR issemver:skipso auto-tag short-circuits.🤖 Generated with Claude Code