Skip to content

ci: cost hygiene (concurrency, filters, retention) - #15

Merged
DevVig merged 1 commit into
mainfrom
ci/cost-hygiene
Oct 29, 2026
Merged

DevVig merged 1 commit into
mainfrom
ci/cost-hygiene

Conversation

@DevVig

@DevVig DevVig commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Cost-hygiene for GitHub Actions, applied only where clearly safe.

Applied

  • Concurrency on .github/workflows/ci.yml (PR/push CI, no existing concurrency):
    • group: ${{ github.workflow }}-${{ github.ref }}
    • cancel-in-progress: true

Skipped (per rules)

  • Docs-only paths-ignore on CI (.github/workflows/ci.yml): skipped. This is the repo’s only test workflow; CONTRIBUTING.md and README say it runs typecheck/tests on every PR/push, so it is likely a required status check. Adding paths-ignore could skip the check on docs-only PRs and leave them blocked.
  • CodeRabbit cron: none on the default branch. No coderabbit-fallback-review (or other CodeRabbit) workflow in .github/workflows/.
  • actions/upload-artifact retention: none. CI does not upload artifacts.
  • macOS/Xcode/Swift path filters: none. No macOS/Xcode/Swift jobs.

Judgment calls

  • Branch protection API was not readable (403), so required-check status for CI is inferred from repo docs, not from protection settings. If CI is confirmed not required, docs-only paths-ignore (**/*.md, docs/**) could be added later.
  • Did not add paths-ignore for other non-code paths (e.g. LICENSE, issue templates) — out of scope.
  • Left workflow_dispatch in place; concurrency still applies to the same ref.

Type of change

  • Refactor / internal

Checklist

  • bun run typecheck passes
  • bun run test passes
  • Context-routing changes include a case in tests/unit-context-window.mjs
  • For model-mapping changes, I noted how the served context window was verified

Notes

Independent of the Namespace runners PR. Based on main only.

Open in Web Open in Cursor 

Summary by CodeRabbit

  • Chores
    • CI runs are now grouped by workflow and Git ref. When a newer run starts in the same group, any in-progress run is canceled. These changes affect automated validation only; no end-user features or product behavior have changed.

Cancel superseded CI runs on the same ref so PR/push jobs do not pile up.

Co-authored-by: Jonathan Borgwing <DevVig@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 00:46
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 62b21459-822a-4a22-ab53-6c631c4b9f18
Commits

Reviewing files that changed from the base of the PR and between fd403e4 and a6e85b2.

Files selected for processing: 1
  • .github/workflows/ci.yml

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Walkthrough

The CI workflow now groups runs by workflow name and Git ref. When a newer run starts in the same group, the workflow cancels the in-progress run.

Changes: CI Run Concurrency

Layer / File(s) Summary
Configure workflow concurrency
.github/workflows/ci.yml
The workflow groups runs by workflow name and Git ref. It cancels an in-progress run in the same group when a newer run starts.

Priority: Low

Estimated code review effort: 2 (Simple) | ~5 minutes

Change: Other

Merge Risk: Minimal · up to a6e85

No actionable merge-blocking risk was identified in this CI-only change.

Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Inconclusive The title "ci: cost hygiene (concurrency, filters, retention)" is a conventional-commit style title. The raw summary and PR objectives show the diff only adds concurrency to .github/workflows/ci.yml, … Narrow the title to the change that the diff contains, for example "ci: cancel superseded runs with workflow concurrency". If the filters and retention items are intended, add the matching changes to the diff before keeping them in the titl…
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Full details: Title check

Explanation

The title "ci: cost hygiene (concurrency, filters, retention)" is a conventional-commit style title. The raw summary and PR objectives show the diff only adds concurrency to .github/workflows/ci.yml, which groups runs by workflow and ref and cancels superseded in-progress runs. The title's "concurrency" part matches the change. However, "filters" and "retention" are not in the changeset: the author states paths-ignore was skipped and no artifact uploads were changed. The title is therefore partially related, because it names the real concurrency change but also lists items the PR did not implement, and "cost hygiene" is vague.

Resolution

Narrow the title to the change that the diff contains, for example "ci: cancel superseded runs with workflow concurrency". If the filters and retention items are intended, add the matching changes to the diff before keeping them in the title.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the workflow’s pace,
New runs take the same grouped place.
By name and ref, each run is found,
The older one steps off the ground.
Then CI hops along its way.

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The reviewer identified no objective defects in the single well-formed concurrency block, leaving nothing outstanding to resolve.

No open issues 🎉

What changed in this PR

This PR applies a cost-hygiene improvement to GitHub Actions by adding a concurrency block to the repository's only CI workflow (.github/workflows/ci.yml). This ensures that redundant in-progress runs for the same workflow and ref are automatically cancelled when new commits arrive, reducing wasted runner minutes. The author intentionally limited the scope to this clearly-safe change, deferring docs-only paths-ignore and other optimizations due to uncertainty around required status checks.

Changes:

  • Add a top-level concurrency group keyed by ${{ github.workflow }}-${{ github.ref }}.
  • Enable cancel-in-progress: true to stop superseded runs.
File Description
.github/​workflows/​ci.yml Adds a concurrency block to cancel superseded in-progress CI runs per workflow/ref, reducing redundant runner usage.

Note: cancel-in-progress: true also applies to push events on main (post-merge runs), so a rapid sequence of merges to main will cancel the earlier commit's run. This is the author's intended cost-hygiene tradeoff and is standard practice, but worth confirming it's acceptable if per-commit main run history is important for your workflow.

Review effort: Balanced

@DevVig
DevVig merged commit fab4d93 into main Oct 29, 2026
3 checks passed
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.

3 participants