fix(ci): sop-checklist-gate does not re-run when tier label is added #817

Closed
opened 2026-05-13 08:39:58 +00:00 by core-devops · 1 comment
Member

Summary

When a tier:* label is added to a PR after the first sop-checklist-gate run, the gate does not re-run. This leaves a stale failure (from the pre-label run when mode=hard) even though the correct result for the labeled tier would be success (tier:low) or a fresh eval (tier:medium).

Root cause

sop-checklist-gate.yml triggers on:

pull_request_target:
  types: [opened, edited, synchronize, reopened]
issue_comment:
  types: [created, edited, deleted]  # only when /sop-ack or /sop-revoke

labeled is missing. Adding a label fires none of the listed events.

Fix

Add labeled and unlabeled to pull_request_target.types:

pull_request_target:
  types: [opened, edited, synchronize, reopened, labeled, unlabeled]

This will trigger a fresh gate evaluation whenever a tier label is added or changed, allowing the script to re-compute mode=soft/hard correctly.

Workaround (current)

Post a compensating status manually:

POST /api/v1/repos/molecule-ai/molecule-core/statuses/{SHA}
body: {"state": "success", "context": "sop-checklist / all-items-acked (pull_request)", "description": "tier:low compensating success — label added after initial gate run"}

Impact

Every PR that receives its tier label after creation requires a manual compensating status. This is currently the common case when the orchestrator adds tier labels to untriaged PRs.

## Summary When a `tier:*` label is added to a PR **after** the first `sop-checklist-gate` run, the gate does not re-run. This leaves a stale `failure` (from the pre-label run when mode=hard) even though the correct result for the labeled tier would be `success` (tier:low) or a fresh eval (tier:medium). ## Root cause `sop-checklist-gate.yml` triggers on: ```yaml pull_request_target: types: [opened, edited, synchronize, reopened] issue_comment: types: [created, edited, deleted] # only when /sop-ack or /sop-revoke ``` `labeled` is missing. Adding a label fires none of the listed events. ## Fix Add `labeled` and `unlabeled` to `pull_request_target.types`: ```yaml pull_request_target: types: [opened, edited, synchronize, reopened, labeled, unlabeled] ``` This will trigger a fresh gate evaluation whenever a tier label is added or changed, allowing the script to re-compute mode=soft/hard correctly. ## Workaround (current) Post a compensating status manually: ``` POST /api/v1/repos/molecule-ai/molecule-core/statuses/{SHA} body: {"state": "success", "context": "sop-checklist / all-items-acked (pull_request)", "description": "tier:low compensating success — label added after initial gate run"} ``` ## Impact Every PR that receives its tier label after creation requires a manual compensating status. This is currently the common case when the orchestrator adds tier labels to untriaged PRs.
Member

Fixed in PR !2238.

  • Removed job-level if: from canvas-deploy-reminder; switched to per-step no-op so the job reports SUCCESS (not skipped) on PRs.
  • Added canvas-deploy-reminder to all-required.needs and the sentinel check so it is aggregated into the required gate.
Fixed in PR !2238. - Removed job-level `if:` from `canvas-deploy-reminder`; switched to per-step no-op so the job reports SUCCESS (not skipped) on PRs. - Added `canvas-deploy-reminder` to `all-required.needs` and the sentinel check so it is aggregated into the required gate.
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#817