Skip to content

Report strict job outcomes as commit statuses so they show in the merge box#951

Merged
mwcraig merged 1 commit into
astropy:mainfrom
mwcraig:strict-status-commit-status
Jul 14, 2026
Merged

Report strict job outcomes as commit statuses so they show in the merge box#951
mwcraig merged 1 commit into
astropy:mainfrom
mwcraig:strict-status-commit-status

Conversation

@mwcraig

@mwcraig mwcraig commented Jul 14, 2026

Copy link
Copy Markdown
Member

Follow-up to #950, which turned out to be necessary but not sufficient. Post-merge verification on #948 showed the renamed strict-status / ubuntu-py313-strict check run was created and appears on the Checks tab, but still not in the merge box. Root cause: check runs created with the Actions GITHUB_TOKEN get attached to the oldest github-actions check suite for the head SHA, and the merge box renders only the newest suite per workflow. Every push or close/reopen creates a new CI check suite, so on any PR with more than one CI run the strict-status check lands in a stale suite and is invisible in the merge box (#948's merge box reports "1 skipped check, 16 successful checks" with no neutral entry, while the check-runs API shows the strict-status checks stuck in the 20:07 suite alongside three newer CI suites).

This switches the reporter from check runs to commit statuses (strict-status/<matrix name> context), which attach directly to the SHA and always render in the merge box — the same mechanism codecov's codecov/patch/codecov/project entries use. The statuses API has no neutral state, so the mapping is:

  • strict tests failed (expected) → success with description "Strict array-API tests failed (expected until the remaining array-API bugs are fixed)."
  • strict tests passed → success with description saying the carve-out can be retired
  • job never wrote an outcome → error, "infrastructure error, not a test failure"

The target_url links each status to the CI run. Workflow permission changes from checks: write to statuses: write.

As before, workflow_run workflows execute from the default branch, so this takes effect after merging; re-verify by re-triggering CI on an open PR and confirming a strict-status/ubuntu-py313-strict line appears in the merge-box check list.

🤖 Generated with Claude Code

https://claude.ai/code/session_01M5FNYqVHbKLbVSGJGftLrL

Check runs created with the Actions token get attached to the oldest
github-actions check suite for the head SHA, and the PR merge box
renders only the newest suite per workflow, so on any PR with more than
one CI run (any push or close/reopen) the strict-status check was
invisible in the merge box even though it appeared on the Checks tab.

Commit statuses attach directly to the SHA and always render in the
merge box (same mechanism codecov uses). The statuses API has no
neutral state, so an expected failure is reported as success with a
description saying so; an infra error reports as error.

Claude-Session: https://claude.ai/code/session_01M5FNYqVHbKLbVSGJGftLrL
@mwcraig mwcraig merged commit 021f3ee into astropy:main Jul 14, 2026
14 of 15 checks passed
@mwcraig mwcraig deleted the strict-status-commit-status branch July 14, 2026 22:57
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