Skip to content

fix(ci): no-op jobs emit same check-run name as their real counterparts - #2243

Merged
HongmingWang-Rabbit merged 1 commit into
stagingfrom
fix/branch-protection-required-check-naming
Apr 29, 2026
Merged

HongmingWang-Rabbit merged 1 commit into
stagingfrom
fix/branch-protection-required-check-naming

Conversation

@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor

Summary

Closes the auto-promote-staging deadlock at a deeper level. Branch protection on `main` requires "E2E API Smoke Test" as a status check. Design B split each gate workflow into `detect-changes` + `no-op` + real-job paths. When paths don't match:

  • Real `e2e-api` job (`name: E2E API Smoke Test`): SKIPPED
  • No-op job (default name `no-op`): SUCCESS

Branch protection counts the skipped check-run as not-satisfied → auto-promote-staging's FF push to main rejected with GH006.

Observed incident

2026-04-29 00:22 UTC, force-dispatched auto-promote-staging on staging tip 3f99fed after gates were all green:

```
remote: error: GH006: Protected branch update failed for refs/heads/main.
remote: - Required status checks "..., E2E API Smoke Test, ..." were not set
by the expected GitHub apps.
```

Every gate green at the workflow-conclusion level, but the per-check-run name didn't match what branch protection required.

Fix

Give the no-op job the same `name:` as the real job. With:

```yaml
no-op:
if: needs.detect-changes.outputs.api != 'true'
name: E2E API Smoke Test
...
e2e-api:
if: needs.detect-changes.outputs.api == 'true'
name: E2E API Smoke Test
...
```

Both jobs register as check-runs named "E2E API Smoke Test". Exactly one runs per workflow execution (mutex `if`). The other registers as skipped with the same name. Branch protection sees at least one success, requirement satisfied.

Applied symmetrically to e2e-staging-canvas.yml's no-op (`name: Canvas tabs E2E`) so the next required-checks reshuffle doesn't recreate this bug.

Why Design B got it half-right

Design B's intent was "emit a result auto-promote can read" — that worked at the workflow-conclusion level. This PR closes the second-order gap: emit a result branch protection can also read.

Test plan

  • PR's CI passes
  • After merge, dispatch auto-promote-staging force=true → FF push to main succeeds
  • main advances to current staging tip

Branch protection on `main` requires "E2E API Smoke Test" as a status
check. With Design B's no-op + e2e-api job split, when paths-filter
excludes a commit:

  - e2e-api job (name="E2E API Smoke Test"): SKIPPED
  - no-op job (name="no-op"): SUCCESS

Branch protection counts the skipped check-run as not-satisfied →
auto-promote-staging's `git push origin main` rejected with GH006.
Observed 2026-04-28 00:22 UTC: every gate green at the workflow level,
all_green=true in auto-promote-staging's gate-check, but the FF push
itself rejected with:

    Required status checks "..., E2E API Smoke Test, ..." were not set
    by the expected GitHub apps.

Fix: give the no-op job the same `name:` as the real one. Now both
register as check-runs named "E2E API Smoke Test" — exactly one runs
per workflow execution (mutex `if`), the other registers as skipped
with the same name. Branch protection sees at least one success,
requirement satisfied.

Same fix applied to e2e-staging-canvas.yml's no-op (name → "Canvas
tabs E2E") for symmetry, even though "Canvas tabs E2E" isn't currently
in main's required check list — kept consistent so the next time a
required-checks reshuffle pulls it in, it doesn't recreate this bug.

Note: Design B's intent was always "emit a result auto-promote can
read" — that intent was satisfied at the workflow-conclusion level
(success), but missed the per-check-run-name level. This PR closes
that second-order gap.
@HongmingWang-Rabbit
HongmingWang-Rabbit added this pull request to the merge queue Apr 29, 2026
Merged via the queue into staging with commit a1bc771 Apr 29, 2026
20 of 21 checks passed
@HongmingWang-Rabbit
HongmingWang-Rabbit deleted the fix/branch-protection-required-check-naming branch April 29, 2026 00:47
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