Conversation
gh pr checks and gh run watch have each reported green for a PR that was untested, conflicting, failed or unreviewed. On retina-server that happened at least eight ways, each kept as a separate memory note that worktree sessions never load, so every session rediscovered the trap it hit. ci_status.py judges the runs for the PR's recorded head instead of the checks table. It sets aside runs whose jobs all skipped (a title or body edit), cancelled duplicates (a stack push) and non-gating events; lets a newer run supersede an older one job by job, so an edit's run cannot hide tests that failed before it; takes each run's latest attempt while listing failed earlier ones (a rerun overwrites the conclusion); decides by job conclusions rather than the run's; reports a conflicting PR as never going to run; checks the PR's head against its branch on GitHub and the local branch; counts other apps' checks and commit statuses; and counts the Claude review only when a bot comment from the latest attempt of this head's review run links back to it with its checklist ticked. It also says when the head's copy of the review workflow differs from the default branch's, since the action then skips itself without a word until the branch is rebased. What may yet arrive (a run, the review run, the head following its branch) is 'not settled' in one reading, because GitHub records no push time to judge the wait against; --watch calls it final once it has seen it last a few minutes. The exit status separates failed (1) from a wrong question (2), not settled (3) and GitHub being unreadable (4), so neither a 502 nor a typo reads as a red build. It lives here rather than in one repo because every repo scaffolded by setup-repo carries the same review workflow and the same gh habits. Its tests run in a workflow of their own so a failure is labelled as theirs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Babissimo
force-pushed
the
feat/ci-status
branch
from
September 25, 2026 11:33
73f26fd to
302f160
Compare
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.
ClickUp: 2.1 Add a ci-status command that reports a PR's real CI state
Summary
gh pr checksandgh run watchhave each reported green for a PR that was untested, conflicting, failed or unreviewed. On retina-server that happened in at least eight distinct ways, each kept as a separate memory note that worktree sessions never load. This adds aci-statusskill tocorewhose script reads the PR's runs directly and exits non-zero unless every gate passed:Exit status: 0 green, 1 failed or will not run until someone acts, 2 the question was wrong, 3 not settled yet, 4 GitHub could not be read.
What it handles
--watchpolls until the answer settles. It rides out outages, and after a few minutes it calls a wait that has not cleared final: no runs, no review run, or a head that has not moved.The script's docstring records what it cannot see.
Testing
tests/ci-status/), a few of them against real git for the local-branch comparison, run by a newci-status testsworkflow with SHA-pinned actions and a read-only token.--commiton retina-server main commits, including one whose first attempt failed.Not done
The last three review passes each found one misreport, all now fixed:
These points from the passes are left as they are:
--commiton a main merge whose deploy job was cancelled in a burst, and so superseded by the next merge's run, reads failed. It judges the commit's runs, not whether the change shipped.--watch, acontinue-on-errorjob that fails while its run is still going ends the watch with exit 1, even if the run then succeeds. The docstring says so.continue-on-error.Review notes
coreplugin goes from 0.6.0 to 0.7.0 so installs pick the skill up.track_progress, so its runs post nothing to link. ci-status says so rather than calling such a PR reviewed.🤖 Generated with Claude Code