From facf048859ef48216c2ac37d05860dddabcca588 Mon Sep 17 00:00:00 2001 From: Dmitrii Vasilev Date: Mon, 5 Oct 2026 05:15:34 +0700 Subject: [PATCH] ci(brain): skip the health report when the run itself was cancelled brain-health-report ran on always(), required all six needs to be `success`, and otherwise exited 1 and posted "CRITICAL: Brain Health Below Threshold ... cannot be merged". A cancelled need is not `success`, so a run replaced by a newer push turned into DAMAGE: run 37228527559 on #870 (stress test cancelled by the next push, report red 12 minutes later, comment at 21:10:18Z), while the replacing run 37234155119 was green throughout. !cancelled() keeps the report running after a failed need and skips it only when the workflow run was cancelled. Of the 10 job-level always() jobs on main this is the only one that tests for `success`; the fpga-ci and fpga-regression summaries exit only on `failure`. Closes #881. Part of #851. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/brain-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/brain-ci.yml b/.github/workflows/brain-ci.yml index f0aeca87e..a68ef7be3 100644 --- a/.github/workflows/brain-ci.yml +++ b/.github/workflows/brain-ci.yml @@ -496,7 +496,10 @@ jobs: name: 📋 Brain Health Report runs-on: ubuntu-latest needs: [detect-build, brain-health-check, build-check, brain-unit, brain-integration, brain-stress, cli-smoke] - if: always() + # Run after a failed need, but not after the run itself was cancelled: + # a cancelled need is not `success`, so always() turned "a newer push + # replaced this run" into DAMAGE and a CRITICAL comment (#881). + if: ${{ !cancelled() }} timeout-minutes: 5 steps: - name: Generate Health Report