From 83afdd5248f1cae0a52740a2910ae88ea64c9d65 Mon Sep 17 00:00:00 2001 From: Julian P Samaroo Date: Tue, 1 Dec 2026 16:39:39 -0700 Subject: [PATCH] Let benchmark summaries stop when their workflow is cancelled The combined summary used always(), so obsolete PR runs could keep a queued summary eligible after cancellation and hold the per-ref concurrency slot. This delayed replacement runs for #817 and #819 until the old runs were force-cancelled. Use GitHub's documented !cancelled() status condition. It still permits the summary after ordinary upstream benchmark failures without keeping the job eligible when the workflow is cancelled. Keep the PR event filter and all concurrency, permissions, benchmark jobs and reporting steps unchanged. Validation: all nine existing benchmark report/comment Node tests pass in a credential-free, network-isolated sandbox; parsed YAML differs only at the summary job predicate; git diff --check passes. No new hosted cancellation experiment is claimed, and actionlint is unavailable. Written by an AI agent on jpsamaroo's review feedback. --- .github/workflows/CI.yml | 2 +- AGENTS.md | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 562415d26..ade688048 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -399,7 +399,7 @@ jobs: needs: [benchmarks, benchmarks-distributed, benchmarks-mpi] runs-on: ubuntu-latest timeout-minutes: 10 - if: ${{ always() && github.event_name == 'pull_request' }} + if: ${{ !cancelled() && github.event_name == 'pull_request' }} permissions: contents: read steps: diff --git a/AGENTS.md b/AGENTS.md index ad8c5740e..697a7b346 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1217,3 +1217,12 @@ this section verbatim). Each entry is one bullet starting with `- `. the protocol alone is not enough for them. Test with a remote reader *and* a remote writer, in both orders: in one process every slot is the argument itself, so none of this is visible. + +109. **Report upstream failures without surviving workflow cancellation.** A + job guarded by `always()` remains eligible after cancellation. Superseded + PR runs were left queued on the combined benchmark summary and held their + per-ref concurrency slots; normal cancellation left that summary queued. + Use `!cancelled()` with the event condition for failure-reporting jobs. + This explicit status check still permits reports after ordinary upstream + failures, while allowing cancelled workflows to finish. Workflow-level + policy about which refs cancel older runs is a separate decision.