From 42f2ea3f4f44dc9fd7725006e86258fe795027b0 Mon Sep 17 00:00:00 2001 From: Hongming Wang Date: Tue, 5 May 2026 04:01:20 -0700 Subject: [PATCH] fix(ci): include event_name in runtime-prbuild-compat concurrency group MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every staging push run for the last 4 SHAs was cancelled by the matching pull_request run because both fired into the same concurrency group: group: ${{ github.workflow }}-${{ ...sha }} Same SHA → same group → cancel-in-progress=true means the second arrival cancels the first. Empirically the push run lost the race; staging branch-protection then saw a CANCELLED required check and the auto-promote chain stalled. Fix: include github.event_name in the group key. push and pull_request runs for the same SHA now hash to different groups, both complete, both report SUCCESS to branch protection. Pattern of the bug: 10:46 sha=1e8d7ae1 ev=pull_request conclusion=success 10:46 sha=1e8d7ae1 ev=push conclusion=cancelled 10:45 sha=ecf5f6fb ev=pull_request conclusion=success 10:45 sha=ecf5f6fb ev=push conclusion=cancelled 10:28 sha=471dff25 ev=pull_request conclusion=success 10:28 sha=471dff25 ev=push conclusion=cancelled 10:12 sha=9e678ccd ev=pull_request conclusion=success 10:12 sha=9e678ccd ev=push conclusion=cancelled Same drift class as the 2026-04-28 auto-promote-staging incident (memory: feedback_concurrency_group_per_sha.md) — globally-scoped groups silently cancel runs in matched-SHA scenarios. This is the only workflow in .github/workflows/ that uses the narrow per-sha shape without event_name. Others either don't use concurrency at all, or use ${{ github.ref }} which is event- neutral. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/runtime-prbuild-compat.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/runtime-prbuild-compat.yml b/.github/workflows/runtime-prbuild-compat.yml index 4033a11c..05b1d37c 100644 --- a/.github/workflows/runtime-prbuild-compat.yml +++ b/.github/workflows/runtime-prbuild-compat.yml @@ -43,7 +43,20 @@ on: types: [checks_requested] concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.head.sha || github.sha }} + # Include event_name so a PR sync (event=pull_request) and the + # subsequent staging push (event=push) on the SAME merge SHA don't + # collide in one group. Without event_name, both runs hashed to + # the same key and cancel-in-progress=true cancelled whichever + # arrived second — usually the push run, which staging branch- + # protection then sees as a CANCELLED required check and refuses + # to mark merged. Caught 2026-05-05 across PR #2869's runs (run + # ids 25371863455 / 25371811486 / 25371078157 / 25370403142 — every + # staging push run cancelled, every matching PR run green). + # + # Per memory `feedback_concurrency_group_per_sha.md` — same drift + # class that broke auto-promote-staging on 2026-04-28. Pin invariant: + # event_name + sha is the minimum unique key for these workflows. + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.head.sha || github.sha }} cancel-in-progress: true jobs: