Skip to content

Name the required check that never ran - #19

Merged
soodoku merged 1 commit into
masterfrom
ci/name-missing-required-checks
Aug 9, 2026
Merged

Name the required check that never ran#19
soodoku merged 1 commit into
masterfrom
ci/name-missing-required-checks

Conversation

@soodoku

@soodoku soodoku commented Aug 9, 2026

Copy link
Copy Markdown
Member

A green rollup is not a satisfied ruleset.

On appeler/pranaam#10 all seven reported checks passed while the required build context never ran at all — its workflow had been cancelled by a concurrency collision when nine Dependabot PRs opened within a minute — and the PR sat BLOCKED for weeks looking entirely green.

The sweep already refused to act on BLOCKED, so nothing unsafe happened. But it reported only the symptom, which sends a reader hunting for a failing check that does not exist. It now fetches the ruleset's required contexts and names the ones with no check run on the PR.

Verified against the real #10 rollup plus fixtures:

801  none  not mergeable (required never ran: build)   <- names it
802  none  not mergeable (BLOCKED)                     <- all contexts reported
803  merge checks terminal and green                   <- unaffected

🤖 Generated with Claude Code

A green rollup is not a satisfied ruleset. On appeler/pranaam#10 all seven
reported checks passed while the required 'build' context never ran at all --
its workflow had been cancelled by a concurrency collision -- and the PR sat
BLOCKED for weeks looking entirely green. Counting reported checks cannot see
that.

The sweep already refused to act on BLOCKED, so nothing unsafe happened, but it
reported only the symptom. It now fetches the ruleset's required contexts and
names the ones with no check run on the PR.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 81acfb0fa5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +163 to +165
gh api "repos/${GH_REPO}/rulesets/${id}" --jq \
'.rules[]? | select(.type=="required_status_checks")
| .parameters.required_status_checks[].context' 2>/dev/null

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Filter required checks to rulesets that apply to the PR

When a repository has disabled rulesets or separate rulesets targeting branches such as release/*, this loop unions their required contexts with those for the PR's base branch because it ignores each ruleset's enforcement and conditions. A blocked Dependabot PR to main can therefore be reported as missing checks that were never required or expected to run on it, defeating the diagnostic this change adds; collect only active rulesets whose conditions match the PR's base ref.

Useful? React with 👍 / 👎.

Comment on lines +226 to +228
absent = never_reported(pr)
reason = (f"required never ran: {','.join(absent)}" if absent
else pr["mergeStateStatus"])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve DIRTY and DRAFT as the primary reason

When a PR is conflicted or still a draft and any required context is absent, this branch replaces DIRTY or DRAFT with required never ran: .... In those states the conflict or draft status is the immediate reason merging is impossible, and checks may intentionally not have run, so the scheduled sweep now directs operators toward the wrong problem; apply the missing-context substitution only when mergeStateStatus is BLOCKED.

Useful? React with 👍 / 👎.

@soodoku
soodoku merged commit 3c990da into master Aug 9, 2026
12 checks passed
@soodoku
soodoku deleted the ci/name-missing-required-checks branch August 9, 2026 08:28
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