Skip to content

chore(ci): add final aggregator job for branch protection#413

Merged
jdx merged 2 commits intomainfrom
ci/final-aggregator-job
May 3, 2026
Merged

chore(ci): add final aggregator job for branch protection#413
jdx merged 2 commits intomainfrom
ci/final-aggregator-job

Conversation

@jdx
Copy link
Copy Markdown
Collaborator

@jdx jdx commented May 3, 2026

Summary

  • Adds a final job to .github/workflows/ci.yml that depends on ci and windows-build, runs with if: always(), and exits non-zero if any upstream job didn't succeed.
  • Mirrors the pattern in aube's ci.yml so branch protection can target a single status check (final) instead of being re-pinned every time a job is added or renamed.
  • Drop-in: branch protection still passes once both ci and windows-build are green; once configured to require final, future jobs added to needs: are automatically gated.

Test plan

  • CI green on this PR — both ci and windows-build pass, then final passes
  • Confirm final reports ::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 final GitHub Actions job that depends on ci and windows-build and is intended to be the single required status check for branch protection.

final runs a short Python gate that inspects needs.*.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.

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-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 3, 2026

Greptile Summary

Adds a final job to .github/workflows/ci.yml that depends on ci and windows-build, always runs unless the workflow is cancelled (if: ${{ !cancelled() }}), and fails if any upstream job did not succeed. This provides a single stable required-status-check target for branch protection.

Confidence Score: 5/5

Safe to merge — workflow-only change with no logic errors found.

No P0 or P1 findings. The if: ${{ !cancelled() }} pattern is the correct idiom for aggregator jobs, the YAML block scalar correctly strips common indentation so the heredoc terminator lands at column 0, and the Python logic accurately handles all upstream job result states.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/ci.yml Adds a final aggregator job with if: ${{ !cancelled() }}, depending on ci and windows-build; uses a Python heredoc to parse needs JSON and exit non-zero on any non-success result. Logic, YAML indentation stripping, and heredoc terminator are all correct.

Reviews (2): Last reviewed commit: "ci: use !cancelled() instead of always()..." | Re-trigger Greptile

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread .github/workflows/ci.yml Outdated
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]>
jdx added a commit to jdx/mise that referenced this pull request May 3, 2026
#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]>
jdx added a commit to jdx/mise-action that referenced this pull request May 3, 2026
## 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]>
jdx added a commit to endevco/aube that referenced this pull request May 3, 2026
## 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]>
jdx added a commit to jdx/hk that referenced this pull request May 3, 2026
## 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]>
jdx added a commit to jdx/fnox that referenced this pull request May 3, 2026
## 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]>
jdx added a commit to jdx/pklr that referenced this pull request May 3, 2026
## 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]>
@jdx jdx merged commit b57738f into main May 3, 2026
6 checks passed
@jdx jdx deleted the ci/final-aggregator-job branch May 3, 2026 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant