Skip to content

docs(adr): codify CI platform coverage — test macOS alongside Ubuntu - #368

Merged
laurigates merged 1 commit into
mainfrom
docs/adr-ci-platform-strategy
Aug 19, 2026
Merged

laurigates merged 1 commit into
mainfrom
docs/adr-ci-platform-strategy

Conversation

@laurigates

Copy link
Copy Markdown
Owner

What

ADR-0017 records the decision to test macOS alongside Ubuntu in CI, replacing
the Ubuntu-only status quo that has held since 2025-09-15. Docs only — the
workflow change lands separately.

Also updates the ADR index and the count in CLAUDE.md.

Why

a264a61 ("ci: simplify smoke test workflow", #78) removed lint-macos and
build-macos, giving as its reason "reduce CI complexity and runtime" — in
the same commit that swapped individual linters for pre-commit and moved shell
testing from zsh to fish. Two beliefs accumulated afterwards and were repeated
when the decision came up again: that macOS runners are expensive, and that
they are slow. Both were checked; neither holds here.

Cost. Public repositories bill standard runners at zero, macOS included.
Measured rather than inferred, against a sibling public repo that does run
macOS jobs:

$ gh api repos/laurigates/kicad-mcp/actions/runs/30608467472/timing --jq .billable
MACOS:  jobs=3  total_ms=0
UBUNTU: jobs=7  total_ms=0

The 10× macOS multiplier applies to private repositories and paid minutes.
GitHub's billing docs are ambiguous about whether macos-latest counts as a
"larger runner", which is where the belief came from; the billing API is not.

Runtime. Same run: macOS queued 2–3 s against Ubuntu's 2–4 s and ran
25–33 s against Ubuntu's 22–27 s — ~20% slower, not an order of magnitude.
This repo's smoke.yml currently runs Linters 92 s + Build (Ubuntu) 46 s.

Coverage. Build (Ubuntu) runs chezmoi apply under Homebrew-on-Linux. It
catches template and source-tree errors, and it usefully guards against
macOS-only assumptions leaking into cross-platform paths — but it cannot
exercise zsh startup, macOS formula availability, completion generation, or
launchd. That is the surface this repo exists to configure.

What the ADR does not claim

The 2025-09 removal also cited complexity, and this ADR does not disprove
that — only the cost and runtime claims were measured. The ADR says so, and
records that if the macOS job proves flaky the response should be moving it to
a schedule rather than deleting it, so the coverage question stays visible.

The daily-driver counter-argument is recorded rather than dismissed: macOS
breakage does surface within hours anyway, which makes this a convenience. The
ADR's position is that it is a convenience that catches regressions before they
reach the machine the author depends on.

Scope limit worth flagging

tests/test-gh-completion.sh (added in #367) is explicitly kept out of CI. It
drives a pty against whatever PRs happen to be open, so its candidate set is
live remote state — it would be green or skipped depending on the day. CI runs
tests whose inputs live in the repository.

Follow-ups

Four separate PRs, each independent:

  • restore the macOS job in smoke.yml (implements this ADR; also corrects the
    now-false "Multi-platform (Ubuntu/macOS)" line in CLAUDE.md)
  • migrate the four drifted workflows to their laurigates/.github counterparts
  • workflow-level permissions and concurrency on the checks that lack them
  • Renovate helpers:pinGitHubActionDigests for SHA pinning

CI has been Ubuntu-only since a264a61 (2025-09-15), which cited complexity and
runtime. Two beliefs accumulated on top of that and were repeated when the
decision came up again: that macOS runners are expensive, and that they are
slow. Neither survives measurement for this repo.

Public repositories bill standard runners at zero, macOS included — confirmed
against a sibling public repo that runs macOS jobs, where the timing API
reports MACOS total_ms=0 alongside UBUNTU total_ms=0. The 10x multiplier is a
private-repo concern. In the same run macOS queued 2-3s and ran 25-33s against
Ubuntu's 2-4s and 22-27s: ~20% slower, not an order of magnitude.

Meanwhile Build (Ubuntu) cannot exercise zsh startup, macOS Homebrew formula
availability, completion generation, or launchd — the entire surface this repo
exists to configure. ADR-0017 records the decision to restore a per-PR macOS
smoke job, the alternatives weighed (scheduled run, full brew bundle), the
costs accepted (2-4 min wall clock, a second flakiness source), and the
conditions for revisiting.

Also scopes out live-state tests: test-gh-completion drives a pty against
whatever PRs are open, so its result depends on remote state rather than the
tree. It stays a local check.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01HjMHsjiYriW362KrsuwV2N
@github-actions github-actions Bot added documentation Improvements or additions to documentation claude size/m labels Aug 19, 2026
@laurigates
laurigates merged commit 37058c7 into main Aug 19, 2026
8 checks passed
@laurigates
laurigates deleted the docs/adr-ci-platform-strategy branch August 19, 2026 11:03
laurigates added a commit that referenced this pull request Aug 19, 2026
## What

Adds `Build (macOS)` to `smoke.yml`, implementing ADR-0017 (#368). This
is the
first CI coverage of the platform the repo exists to configure since
`a264a61` removed it on 2025-09-15.

## Why now

The two reasons recorded for removing it were measured and do not hold
here:

- **Cost** — public repositories bill standard runners at zero, macOS
included.
`gh api .../timing` on a sibling public repo running macOS jobs reports
  `MACOS: jobs=3, total_ms=0`.
- **Runtime** — macOS queued 2–3 s and ran 25–33 s against Ubuntu's 2–4
s and
  22–27 s in that same run. ~20% slower, not 10×.

The third reason, complexity, was not disproved and the ADR says so.

## Three deliberate differences from Build (Ubuntu)

**No `setup-homebrew` action.** macOS runners ship Homebrew
preinstalled; the
Linux jobs need the action only because linuxbrew is not.

**zsh is not installed from Homebrew, and the test runs `/bin/zsh`.**
This is
the one that matters. macOS ships zsh 5.9, and that is the zsh this
configuration targets — `dot_zfunc/__git_branch_names` overrides a
helper from
the completion system zsh 5.9 provides, and its own header comment names
*"zsh 5.9 — the one macOS ships as `/bin/zsh`"*. Installing brew's zsh
would
smoke-test a different shell than the daily driver actually runs, which
would
make the job green while the real thing was broken.

**Cache path** is `~/Library/Caches/Homebrew`.

Gated on `needs: [lint]` like the Ubuntu build, so a lint failure
doesn't burn a
second runner.

## Also corrects a stale claim

`CLAUDE.md` has described `smoke.yml` as *"Multi-platform (Ubuntu/macOS)
linting
and build"* for the eleven months it was Ubuntu-only. The line now says
what is
actually true — linting on Ubuntu, build and zsh smoke test on both —
and links
the ADR.

## What this PR can't tell you yet

The estimate in ADR-0017 was 2–4 min of added wall clock, dominated by
`brew install` on a cold runner. This PR's own CI run is the first real
measurement; if it lands well outside that range, the ADR's revisit
condition
(move to a schedule rather than delete) is the thing to reach for.

`actionlint` clean.

## Conflict note

#372 also touches `smoke.yml`, adding `concurrency` and `permissions`
above
`jobs:`. Different region of the file, so they should merge cleanly in
either
order — but whichever lands second may want a rebase check.

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude documentation Improvements or additions to documentation size/m

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant