Skip to content

Trim PR Actions usage and defer macOS packaging to merge/release - #183

Open
WellDunDun wants to merge 5 commits into
mainfrom
codex/trim-actions-usage
Open

WellDunDun wants to merge 5 commits into
mainfrom
codex/trim-actions-usage

Conversation

@WellDunDun

@WellDunDun WellDunDun commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Cancel superseded PR runs in CI, Desktop and Self-Host Image without cancelling unrelated workflows or release candidates. Docs-only PRs skip heavy jobs, while required lint/test names fail closed on selector or lint errors. Keep Linux/Windows packaging/smoke tests on PRs and all four desktop targets on main, merge queue and immutable releases. The existing Publish test job keeps the full post-merge workspace suite; CI covers merge queues without a redundant new CI push run.

Apply the ci-cost-trim skill: add the 30-day report, per-run ledger and a bounded test-suite audit. Pass dynamic matrix fields via quoted environment variables to remove the shell-interpolation findings exposed by the security scan. Signing, provenance, release/smoke gates, secrets and main rules remain unchanged.

Audit: 76 run records and 547.50 observed runner minutes, including controlled verification runs. Excluding those verification branches, macOS PR jobs consumed 65.38 min. That is a gross saving opportunity, not net savings: new full main/merge verification offsets it. No test deletion, quarantine or scanner consolidation is performed; no billed-dollar or post-merge saving claim is made.

Validation:

  • actionlint, changed-file oxlint/oxfmt and commit hooks pass; 23 release/workflow tests and 9 selector tests pass. Zizmor remains non-clean on documented pre-existing findings; the newly introduced matrix injection findings are fixed.
  • Pre-audit full CI/Desktop/Image runs 41443911708, 41443911448 and 41443911471 passed. Final audited runs 41453728992, 41453728746 and 41453728751 execute the same heavy gates, with Linux/Windows PR targets only.
  • Final docs-only PR CI verification only: documentation skips heavy jobs #184, run 41453938737: changes passes; lint/test/build-dashboard skip; Desktop/Image do not trigger.
  • Deliberate selector-failure PR DO NOT MERGE: verify CI failure propagation #185, CI run 41453874222: both required lint and test report failure. Unexpected selection failures cannot become successful skips. Both test PRs are closed without merging.
  • Replacing a commit automatically cancelled CI/Desktop/Image runs 41443628010/016/019. No cancellation API was used for those runs. An older always()-based probe needed cleanup; it is not counted as automatic cancellation proof.
  • Local merge-group/matrix coverage passes. Live merge-queue verification is pending because no queue is configured/exercised. Main rule contexts remain lint/test.

Reports: CI cost report, test-suite discovery. No implementation merge, secret changes or test removal. Two-week remeasurement plan included, not scheduled.

@coderabbitai

coderabbitai Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Summary

Summary by CodeRabbit

  • CI Improvements
    • Documentation-only pull requests skip resource-intensive build and verification jobs while retaining required check names.
    • Superseded pull-request runs are canceled automatically; other workflow runs are not canceled by this policy.
    • Desktop checks cover macOS packages on merge and release, while pull-request checks focus on Linux and Windows.
    • Merge-queue verification is supported across CI workflows.
  • Documentation
    • Added guidance on CI triggers, required checks, platform coverage, and pre-merge verification.
    • Added reports on CI usage and test-suite efficiency.

A shared CI policy classifies pull-request changes and selects job execution and desktop targets. CI, desktop, and self-host workflows use the policy outputs and update their triggers and concurrency behavior.

Changes: CI Policy and Workflow Selection

Layer / File(s) Summary
Policy selection and validation
.github/scripts/ci-policy.mjs, .github/scripts/ci-policy.test.mjs
The selector classifies documentation-only paths, obtains pull-request changed paths, and selects heavy-job execution and desktop targets by event. Tests cover path handling and event policies.
Required CI gates and merge-queue validation
.github/workflows/ci.yml, tests/scripts/release-workflows.test.ts
The CI workflow adds merge-group runs and selector-driven gates for lint, tests, and the dashboard build. Workflow tests check selector-failure handling, triggers, and cancellation behavior.
Desktop and self-host workflow selection
.github/workflows/desktop.yml, .github/workflows/selfhost-image.yml, tests/scripts/release-workflows.test.ts
Desktop and self-host workflows add selector jobs and use their outputs to control work. The desktop build uses the selected matrix and passes packaging values through environment variables.
CI documentation and reports
.changeset/trim-actions-usage.md, docs/ci.md, docs/reports/*
The changeset and CI guide describe CI behavior. The reports document observed CI costs, workflow inventory, test-step timing, and measurement limits.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant GitHubEvent
  participant Policy as ci-policy.mjs
  participant ChangesJob as changes
  participant CIJobs as CI workflow jobs
  participant DesktopBuild as desktop build
  GitHubEvent->>Policy: event name and changed paths
  Policy-->>ChangesJob: run_heavy and desktop_matrix
  ChangesJob->>CIJobs: run_heavy controls job execution
  ChangesJob->>DesktopBuild: desktop_matrix selects build targets
Loading
Merge Risk: Minimal · up to 4af0e

This PR changes CI triggers, cancellation and path-based job selection. The reviewed evidence shows no regression in main-push coverage, and the only remaining comment is a cosmetic documentation nit. It is ready to merge once the hosted heavy-job results pass.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Title check Warning The title accurately describes the CI workflow changes, but it does not use the required Conventional Commits prefix. Prefix the title with an allowed type, such as "ci: Trim PR Actions usage and defer macOS packaging to merge/release".
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
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.
Description check Passed The pull request description directly matches the changeset. It describes CI cancellation, documentation-only job selection, desktop matrix changes, workflow validation, security fixes, and audit repo…
Full details: Description check

Explanation

The pull request description directly matches the changeset. It describes CI cancellation, documentation-only job selection, desktop matrix changes, workflow validation, security fixes, and audit reports.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. 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 3 functions across 3 files. (5 skipped: 5 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@coderabbitai coderabbitai Bot 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.

Additional comments: 1
docs/reports/ci-cost-report.md-1-1: 1

1-1: Minor · Maintainability & Code Quality · Quick win

Unverified finding
Verification ran but could not confirm this finding. It is shown for review, not as a verified issue.

Add a top-level heading before the table.

The first line is the summary table, so markdownlint-cli2 reports MD041. Move # CI cost report to Line 1 and keep the table below it. (github.com)

Source: Linters/SAST tools


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 965b9c7 and 4af0e7f.

Files ignored due to path filters: 1
  • docs/reports/ci-cost-runs.csv is excluded by !**/*.csv
Files selected for processing: 6
  • .github/workflows/ci.yml
  • .github/workflows/desktop.yml
  • docs/ci.md
  • docs/reports/ci-cost-report.md
  • docs/reports/test-suite-efficiency-report.md
  • tests/scripts/release-workflows.test.ts
Files with no reviewable changes: 1
  • .github/workflows/ci.yml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

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