Skip to content

Stop reporting cancelled runs as failures - #16

Merged
tschm merged 1 commit into
mainfrom
fix/cancelled-runs-are-no-verdict
Aug 30, 2026
Merged

Stop reporting cancelled runs as failures#16
tschm merged 1 commit into
mainfrom
fix/cancelled-runs-are-no-verdict

Conversation

@tschm

@tschm tschm commented Aug 30, 2026

Copy link
Copy Markdown
Member

A run that was stopped by hand, or killed by a concurrency group when a newer push superseded it, carries no verdict about the branch — and stale means it never really ran. Both were counted as red, so a repo went red for the sole reason that somebody cancelled a job.

What changes

  • Default branch. Cancelled and stale runs are skipped when picking each workflow's latest run, so a workflow keeps showing its last real verdict. The targeted per-workflow fetch now asks for 5 runs instead of 1, because the newest one may be the cancelled one and the API has no "conclusive only" filter.
  • Nothing to judge stays absent. A workflow whose only runs are cancelled is left out of the exposition entirely, rather than reported red — the same way a workflow that never ran is. Likewise jq_ci_last_run* is not emitted for a repo whose only run was cancelled.
  • Pull requests follow the same rule. Only failure counts toward jq_open_pull_requests_failing. The PR table still shows cancelled in its checks column, so the information isn't lost — it just doesn't read as red.
  • Dashboards. Both boards drop cancelled from the failing-PR panel queries.

Testing

pytest — 51 passed. Six new tests cover the fallback to the last conclusive run, the absent-not-red case on both layers, the multi-run direct fetch, and the PR count.

🤖 Generated with Claude Code

A run that was stopped by hand, or killed by a concurrency group when a
newer push superseded it, carries no verdict about the branch - and
`stale` means it never really ran. Both were being counted as red, so a
repo turned red for the sole reason that somebody cancelled a job.

Cancelled and stale runs are now skipped when picking each workflow's
latest run, so the workflow keeps showing its last real verdict. The
targeted per-workflow fetch asks for five runs instead of one, because
the newest may be the cancelled one and the API has no filter for it.
A workflow whose only runs are cancelled is absent from the exposition
rather than red, which reads the same as a workflow that never ran.

Pull requests follow the same rule: only `failure` counts as failing.
The PR table still shows "cancelled" in its checks column, and both
dashboards drop it from the failing-PR panels.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@tschm
tschm merged commit d47c7a3 into main Aug 30, 2026
4 checks passed
@tschm
tschm deleted the fix/cancelled-runs-are-no-verdict branch August 30, 2026 11:36
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