From 6f98d53ee8426cb165258aed41af7458c15c56dd Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Thu, 29 Oct 2026 00:46:18 +0000 Subject: [PATCH] ci: cost hygiene (concurrency, filters, retention) Add cancel-in-progress concurrency on PR/push CI, run the CodeRabbit fallback cron once daily on weekdays, and retain release artifacts 7 days. Co-authored-by: Jonathan Borgwing --- .github/workflows/ci.yml | 4 ++++ .github/workflows/coderabbit-fallback-review.yml | 5 +++-- .github/workflows/pr-title.yml | 4 ++++ .github/workflows/release.yml | 4 ++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59519e3..9c75767 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,6 +5,10 @@ on: branches: [main] pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + permissions: contents: read diff --git a/.github/workflows/coderabbit-fallback-review.yml b/.github/workflows/coderabbit-fallback-review.yml index 5e4b199..5296d45 100644 --- a/.github/workflows/coderabbit-fallback-review.yml +++ b/.github/workflows/coderabbit-fallback-review.yml @@ -13,7 +13,8 @@ name: CodeRabbit fallback review on: schedule: # Stagger this minute when copying to other repos so they do not fire together. - - cron: "59 * * * *" + # Was hourly (`59 * * * *`); now once daily on weekdays. + - cron: "59 0 * * 1-5" issue_comment: types: [created] pull_request: @@ -77,7 +78,7 @@ jobs: FALLBACK_COMMENT_BODY: ${{ github.event.comment.body }} # Pin one PR for issue_comment, workflow_dispatch(pr_number), and # pull_request (the triggering PR). Schedule leaves this empty so the - # hourly sweep can drain the backlog. + # weekday daily sweep can drain the backlog. FALLBACK_PR_NUMBER: ${{ inputs.pr_number || github.event.issue.number || github.event.pull_request.number }} # pull_request runs are always dry-run so opening this workflow cannot # comment on other PRs. schedule and issue_comment may post. diff --git a/.github/workflows/pr-title.yml b/.github/workflows/pr-title.yml index 357f074..27b299a 100644 --- a/.github/workflows/pr-title.yml +++ b/.github/workflows/pr-title.yml @@ -4,6 +4,10 @@ on: pull_request: types: [opened, edited, synchronize, reopened] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + # Token needs read access to the PR payload; some orgs tighten defaults. permissions: contents: read diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b46a1e0..f74c8f0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,6 +47,7 @@ jobs: with: name: binaries-${{ matrix.target }} path: ${{ env.ASSET }} + retention-days: 7 build-ui-macos: name: build menu bar app (${{ matrix.target }}) @@ -239,6 +240,7 @@ jobs: with: name: ui-${{ matrix.target }} path: ui-out/* + retention-days: 7 assemble-assets: name: assemble release assets @@ -304,6 +306,7 @@ jobs: with: name: release-assets-${{ github.ref_name }} path: release-assets/* + retention-days: 7 formula-smoke-prepublish: name: pre-publish formula smoke (${{ matrix.arch }}) @@ -401,6 +404,7 @@ jobs: with: name: formula-${{ github.ref_name }} path: Formula/microbridge.rb + retention-days: 7 formula-smoke-public-assets: name: public-asset formula smoke (${{ matrix.arch }})