chore(ci): add final aggregator job for branch protection#413
Conversation
Adds a `final` job that depends on `ci` and `windows-build`, runs with `if: always()`, and exits non-zero if any upstream job didn't succeed. Lets branch protection target a single status check instead of every matrix entry, mirroring the pattern used in aube. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Greptile SummaryAdds a Confidence Score: 5/5Safe to merge — workflow-only change with no logic errors found. No P0 or P1 findings. The No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "ci: use !cancelled() instead of always()..." | Re-trigger Greptile |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 4ac30f3. Configure here.
Per Cursor Bugbot review: combined with the workflow's `cancel-in-progress` group, `if: always()` would override cancellation and run the aggregator even on superseded commits. `!cancelled()` still runs on upstream success or failure but skips when the workflow is cancelled. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
#9569) ## Summary - Combined with the workflow's `cancel-in-progress` group (active on PRs), `if: always()` overrides cancellation and runs the `test-ci` aggregator even on superseded commits. - `!cancelled()` still runs on upstream success or failure but skips when the workflow is cancelled — saves a runner and avoids confusing error annotations on already-superseded shas. - Same pattern as the `registry-ci` fix in #7435; this one was missed. - Found while applying the same fix across sibling repos after Cursor Bugbot flagged it on endevco/pitchfork#413. ## Test plan - [ ] CI passes on this PR 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: changes only a GitHub Actions job condition to avoid running the `test-ci` aggregator when a workflow is cancelled, without affecting build/test logic. > > **Overview** > Updates the `test-ci` aggregator job in `.github/workflows/test.yml` to use `if: ${{ !cancelled() }}` instead of `always()`, so it still runs after upstream success/failure but is skipped when the workflow is cancelled (avoiding wasted runners and noisy failures on superseded runs). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit c3f58b6. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
## Summary - Combined with the workflow's `cancel-in-progress` group, `if: always()` overrides cancellation and runs the `final` aggregator even on superseded commits. - `!cancelled()` still runs on upstream success or failure but skips when the workflow is cancelled — saves a runner and avoids confusing error annotations on already-superseded shas. - Caught by Cursor Bugbot on a sibling repo (endevco/pitchfork#413). Same `final`-aggregator pattern + `cancel-in-progress: true` here, so the same fix applies. ## Test plan - [ ] CI passes on this PR 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk CI-only change that just adjusts when the `final` job runs; main risk is slightly different status reporting when runs are cancelled. > > **Overview** > Updates the GitHub Actions `final` aggregator job to use `if: ${{ !cancelled() }}` instead of `always()`, so it still runs for upstream success/failure but **does not** run for cancelled workflows (e.g., superseded runs under `cancel-in-progress`). > > Adds clarifying comments to document why cancellation should skip the aggregator to avoid wasting runners and producing noise on cancelled commits. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 4c62d5f. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
## Summary - Combined with the workflow's `cancel-in-progress` group, `if: always()` overrides cancellation and runs the `final` aggregator even on superseded commits. - `!cancelled()` still runs on upstream success or failure but skips when the workflow is cancelled — saves a runner and avoids confusing error annotations on already-superseded shas. - Caught by Cursor Bugbot on a sibling repo (endevco/pitchfork#413). Same `final`-aggregator pattern + `cancel-in-progress: true` here, so the same fix applies. ## Test plan - [ ] CI passes on this PR - [ ] Push a follow-up commit to verify the prior workflow run gets cancelled cleanly (final no longer spinning up on superseded commits) 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk workflow-only change that just prevents the `final` aggregator job from running on cancelled CI runs; it may affect required status reporting only in cancellation scenarios. > > **Overview** > Updates the CI workflow’s `final` aggregator job to run with `if: ${{ !cancelled() }}` instead of `always()`, so it still gates upstream success/failure but **does not** start when a run is cancelled (e.g., by `cancel-in-progress`). This avoids consuming runners and emitting status annotations on superseded commits. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 7ae7997. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
## Summary - Combined with the workflow's `cancel-in-progress` group, `if: always()` overrides cancellation and runs the `final` aggregator even on superseded commits. - `!cancelled()` still runs on upstream success or failure but skips when the workflow is cancelled — saves a runner and avoids confusing error annotations on already-superseded shas. - Caught by Cursor Bugbot on a sibling repo (endevco/pitchfork#413). Same `final`-aggregator pattern + `cancel-in-progress: true` here, so the same fix applies. ## Test plan - [ ] CI passes on this PR 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk CI-only change that adjusts when the `final` job runs; main impact is potentially skipping failure aggregation on cancelled/superseded runs. > > **Overview** > Updates the GitHub Actions `final` aggregator in `ci.yml` to use `if: ${{ !cancelled() }}` instead of `always()`, so it still runs after upstream success/failure but **does not run when the workflow is cancelled** (e.g., due to `cancel-in-progress`). This avoids consuming runners and emitting misleading failure annotations on superseded commits. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 3b8b543. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
## Summary - Combined with the workflow's `cancel-in-progress` group, `if: always()` overrides cancellation and runs the `final` aggregator even on superseded commits. - `!cancelled()` still runs on upstream success or failure but skips when the workflow is cancelled — saves a runner and avoids confusing error annotations on already-superseded shas. - Caught by Cursor Bugbot on a sibling repo (endevco/pitchfork#413). Same `final`-aggregator pattern + `cancel-in-progress: true` here, so the same fix applies. ## Test plan - [ ] CI passes on this PR 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk CI-only change that only affects when the `final` aggregator job runs; no product code is modified. > > **Overview** > Updates the CI workflow so the `final` aggregator job runs for upstream success/failure but **does not run when the workflow is cancelled**, replacing `if: always()` with `if: ${{ !cancelled() }}` to avoid consuming runners and reporting failures on superseded commits. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit a2f7240. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
## Summary - Combined with the workflow's `cancel-in-progress` group, `if: always()` overrides cancellation and runs the `final` aggregator even on superseded commits. - `!cancelled()` still runs on upstream success or failure but skips when the workflow is cancelled — saves a runner and avoids confusing error annotations on already-superseded shas. - Caught by Cursor Bugbot on a sibling repo (endevco/pitchfork#413). Same `final`-aggregator pattern + `cancel-in-progress: true` here, so the same fix applies. ## Test plan - [ ] CI passes on this PR 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk GitHub Actions workflow change that only affects when the `final` aggregator job runs; it should reduce wasted runner usage without touching build/test logic. > > **Overview** > Updates `.github/workflows/ci.yml` so the `final` aggregator job uses `if: ${{ !cancelled() }}` instead of `always()`, allowing `cancel-in-progress` to actually stop superseded runs. > > This keeps `final` running for upstream success/failure but skips it on cancellation, reducing wasted runners and avoiding misleading failure annotations on cancelled workflows. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 72ee416. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>

Summary
finaljob to.github/workflows/ci.ymlthat depends onciandwindows-build, runs withif: always(), and exits non-zero if any upstream job didn't succeed.final) instead of being re-pinned every time a job is added or renamed.ciandwindows-buildare green; once configured to requirefinal, future jobs added toneeds:are automatically gated.Test plan
ciandwindows-buildpass, thenfinalpassesfinalreports::error::and fails when an upstream job fails (verifiable on a future PR that breaks one of the jobs)🤖 Generated with Claude Code
Note
Low Risk
Low risk workflow-only change that adds a new gating job; main risk is misconfiguration causing PRs to be blocked if job results are interpreted unexpectedly.
Overview
Adds a new
finalGitHub Actions job that depends onciandwindows-buildand is intended to be the single required status check for branch protection.finalruns a short Python gate that inspectsneeds.*.result, emits::notice::/::error::per upstream job, and fails the workflow if any dependency did not complete successfully (while skipping execution when the workflow is cancelled).Reviewed by Cursor Bugbot for commit f68d5ea. Bugbot is set up for automated code reviews on this repo. Configure here.