Skip to content

ci(maintainer-approval): publish gate as a commit status instead of a failing job - #4580

Closed
purp wants to merge 1 commit into
NVIDIA:mainfrom
purp:ci/4559-maintainer-approval-status/purp
Closed

purp wants to merge 1 commit into
NVIDIA:mainfrom
purp:ci/4559-maintainer-approval-status/purp

Conversation

@purp

@purp purp commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

The maintainer approval gate fails, and emails the commenter, on every review comment on an unapproved PR. This moves the gate from the job's own result to a commit status, so a missing approval never fails a workflow run. As the issue explains, skipping comment reviews alone is unsafe because a skipped required check counts as passing.

Related Issue

Closes #4559

Changes

  • maintainer-approval.yml now only asks for the gate to be checked again. It skips commented reviews and never fails. Its job is renamed Maintainer Approval Trigger, so it is no longer the required check. The run name carries the PR number.
  • New maintainer-approval-status.yml (workflow_run) runs main's copy with statuses: write, fork PRs included. It evaluates approval with the unchanged check_maintainer_approval.py and posts the OpenShell / Maintainer Approval commit status on the PR head.
    • It trusts the PR number from the run name only when that PR is open and its head equals the run's head_sha. Otherwise it posts nothing.
    • After a push, the new head has no status until it is checked again, so the PR stays blocked.
    • Merge-queue runs get a passing status.
  • CONTRIBUTING.md names the commit status as the context to add to ruleset 13332227, and notes that the decision now runs main's copy.

Testing

  • Checks appropriate to the affected code and behavior pass. Not run locally: the sandbox has no network access, so actionlint and mise run test:maintainer-approval did not run. check_maintainer_approval.py is unchanged. I checked the run-name regex by hand.
  • Unit tests added/updated (if applicable). Not applicable: no script changes.
  • E2E tests added/updated (if applicable). Not applicable.

workflow_run workflows only run from the default branch, so the status workflow can only be checked end to end after merge. Before adding the context to the ruleset, confirm on a live PR that:

  1. A comment produces no failed run.
  2. An approval posts a success status.
  3. A push leaves the new head pending or failing.

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)
  • Architecture docs updated (if applicable)

🤖 Generated with Claude Code

… failing job

The Maintainer Approval job failed on every review comment on an
unapproved PR, emailing the commenter each time. Split it so the
review-triggered workflow only signals re-evaluation (skipping comment
reviews and never failing), and a workflow_run workflow running main's
copy posts the required `OpenShell / Maintainer Approval` commit status.
Commit status failures send no email, a push leaves the new head
pending, and merge-group runs get a passing status.

Closes NVIDIA#4559

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jim Meyer <jimeyer@nvidia.com>
@copy-pr-bot

copy-pr-bot Bot commented Oct 15, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

Comment on lines +10 to +13
on:
workflow_run:
workflows: [Maintainer Approval]
types: [completed]
@purp

purp commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

If ever you wanted to see a kludged together approach, this is it. 🤢

@purp purp closed this Oct 20, 2026
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.

bug: Maintainer Approval check fails and emails on every review comment

2 participants