From d302b8dfc24e2aa6b4594f0792f814acdf5cb3d5 Mon Sep 17 00:00:00 2001 From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Fri, 6 Nov 2026 11:58:59 -0500 Subject: [PATCH] ci: native-queue-policy re-triggers queue instead of cancelling the evidence wait Stage-label flips fire pull_request_target every few minutes; with cancel-in-progress the 22.5-minute evidence wait never completed (173/173 runs cancelled on #16607). Serialise per PR, never cancel. Closes #16942 Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- .github/scripts/test-native-queue-workflows.py | 13 +++++++++++++ .github/workflows/native-queue-policy.yml | 7 ++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/scripts/test-native-queue-workflows.py b/.github/scripts/test-native-queue-workflows.py index 5f0d3ce44e..429a771340 100644 --- a/.github/scripts/test-native-queue-workflows.py +++ b/.github/scripts/test-native-queue-workflows.py @@ -61,6 +61,19 @@ def test_owned_gate_uses_trusted_base_not_member_code(self): manifest = yaml.safe_load((ROOT / ".github/release-lines.yml").read_text()) self.assertEqual(manifest["pinned"]["native-queue-policy.yml"], ["v6", "-v4"]) + def test_owned_gate_retriggers_never_cancel_the_evidence_wait(self): + # Stage-label flips re-fire the PR-target run every few minutes; a + # cancelling concurrency group would never let the bounded evidence + # wait finish (#16942). Re-triggers must still run (a hold added after + # a green run must turn the check red) but must queue, not cancel. + data = workflow("native-queue-policy.yml") + events = data.get("on", data.get(True)) + for action in ("edited", "labeled", "unlabeled"): + self.assertIn(action, events["pull_request_target"]["types"]) + concurrency = data["concurrency"] + self.assertIn("github.event.pull_request.number", concurrency["group"]) + self.assertIs(concurrency["cancel-in-progress"], False) + def test_dependabot_runs_the_same_trusted_pr_verifier(self): verifier = workflow("pr-verifier.yml") events = verifier.get("on", verifier.get(True)) diff --git a/.github/workflows/native-queue-policy.yml b/.github/workflows/native-queue-policy.yml index 08420d8e43..14e47553dc 100644 --- a/.github/workflows/native-queue-policy.yml +++ b/.github/workflows/native-queue-policy.yml @@ -15,7 +15,12 @@ permissions: concurrency: group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.event.pull_request.number || github.run_id }} - cancel-in-progress: ${{ github.event_name == 'pull_request_target' }} + # Serialise per PR but never cancel: the evidence wait below runs up to + # 22.5 min, and every stage-label flip re-fires this workflow. With + # cancel-in-progress the check could never reach a verdict on a PR the + # hive is actively staging (#16942). The queued run re-reads the mutable + # PR state after the current one finishes, so fail-closed is preserved. + cancel-in-progress: false jobs: policy: