Skip to content

chore(ci): cut the macOS minutes a pull request burns - #86

Merged
Mxo01 merged 1 commit into
mainfrom
chore/85-cut-ci-macos-minutes
Nov 29, 2026
Merged

Mxo01 merged 1 commit into
mainfrom
chore/85-cut-ci-macos-minutes

Conversation

@Mxo01

@Mxo01 Mxo01 commented Nov 29, 2026

Copy link
Copy Markdown
Owner

Closes #85

What changes

  • gitleaks: scans on pull_request and on push to main only, with a concurrency group that cancels a superseded scan — one scan per change instead of two for the same commit.
  • Dynamic Type guard: moves out of the macOS job into its own ubuntu-latest job, with timeout-minutes: 5; the macOS job needs: it, so a fixed text size still fails the pull request before any simulator work.
  • macOS job timeout: 12 minutes, chosen from the measured distribution (median 2.3 min, p90 2.8), so a hang bills $0.74 instead of $1.86.
  • paths-ignore: **.md and docs/**, so a documentation-only pull request starts no CI run. scripts/ is deliberately not ignored — the coverage gate and the allowlist it reads are still evaluated on every change that can move them.
  • Coverage gate untouched: 100% line coverage on every touched FitCheck/ Swift file via scripts/coverage_gate.py --base origin/main, same conditions, same allowlist.
  • README and AGENTS.md sentences that described the old topology updated in the same change.

Why the three 15-minute jobs hung, 17–18 November

None of them ever reached a runner, and the workflow could not have fixed it. The check-run annotations say it plainly:

  • runs 44188782211 and 44184679754 — The job was not acquired by Runner of type hosted even after multiple attempts, alongside GitHub's own Due to capacity constraints, jobs targeting macOS arm64 runners may experience longer queue times. The job sat queued while GitHub retried acquiring a macos-26 arm64 hosted runner, then gave up at ~15 minutes and failed the run.
  • run 44362210414 — the same capacity wait, ended by a manual cancel (The run was canceled by @Mxo01).

Queued time never assigned to a runner is not billed as macOS minutes, so those waits cost $0 in minutes; what they cost was a failed check. The fix belongs on the runner side (re-run, or a fallback runs-on for the day GitHub's arm64 macOS pool is short), not in this workflow.

Expected effect

With the push trigger already gone, the remaining macOS cost is one job per pull request: ~35 billable runs a month at ~2.2 min ≈ 80 macOS minutes, down from the ~147 billed in the last 30 days (and from the 198 counted including queue waits) — roughly $5 of the $12 allowance, with the worst case for a hang capped at 12 minutes.

@Mxo01

Mxo01 commented Nov 29, 2026

Copy link
Copy Markdown
Owner Author

The two red checks are the account's Actions spending limit, not this diff. Both runs of 46263210882 and 46263210919 failed in 2 seconds with zero steps and this annotation:

The job was not started because recent account payments have failed or your spending limit needs to be increased.

What the runs do prove: Actions parsed this workflow and registered the new job graph — the check list shows Dynamic Type Guard on ubuntu-latest and Unit Tests skipped because it needs it, which is exactly the needs: edge this pull request adds. No job is executable on a private repository until the limit is raised or the monthly reset lands.

Offline validation, for the record:

  • actionlint 1.7.12 on both workflows: exit 0, no findings.
  • python3 scripts/check_dynamic_type.py --paths FitCheck and --self-test: pass (48 files, 14 cases).
  • Ruby YAML parse of both files: job keys, paths-ignore, needs, timeout-minutes 12 / 5 and the concurrency groups all as intended.
  • Reviewer pass on the branch diff: clean after one blocking round (two stale AGENTS.md sentences, both fixed).

Merge once a run can start; nothing in the diff needs to change for it.

@Mxo01
Mxo01 merged commit 647b76a into main Nov 29, 2026
1 of 3 checks passed
@Mxo01
Mxo01 deleted the chore/85-cut-ci-macos-minutes branch November 29, 2026 12:41
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.

Cut the macOS minutes the CI burns

1 participant