Skip to content

ci: simplify smoke test workflow - #78

Merged
laurigates merged 1 commit into
mainfrom
ci-smoke-test-revision
Sep 15, 2025
Merged

laurigates merged 1 commit into
mainfrom
ci-smoke-test-revision

Conversation

@laurigates

Copy link
Copy Markdown
Owner

Summary

  • Removes macOS jobs to reduce CI complexity and runtime
  • Replaces individual linters with unified pre-commit hooks
  • Switches shell testing from zsh to fish (primary shell)

Context

This implements the changes recommended by Claude in GitHub Actions run #17341193324 to streamline CI while maintaining comprehensive testing coverage through pre-commit hooks.

Test plan

  • Verify pre-commit runs all necessary linters
  • Confirm fish shell tests work correctly
  • CI passes on Ubuntu

🤖 Generated with Claude Code

- Remove macOS jobs to reduce CI complexity and runtime
- Replace individual linters with unified pre-commit hooks
- Switch shell testing from zsh to fish (primary shell)
- Consolidate to Ubuntu-only testing matrix
@claude

claude Bot commented Sep 15, 2025

Copy link
Copy Markdown
Contributor

Pull Request Review

Summary

This PR simplifies the CI workflow by removing macOS jobs and consolidating linters into pre-commit hooks. While the changes reduce complexity and runtime, there are several concerns that should be addressed.

🟡 Code Quality & Best Practices

Strengths:

  • ✅ Good consolidation of linting tools into pre-commit framework
  • ✅ Proper use of job dependencies (needs: [lint])
  • ✅ Maintains cache optimization for Homebrew

Concerns:

  1. Missing shellcheck integration: The PR removes explicit shellcheck but it's not included in .pre-commit-config.yaml. Shell scripts are critical infrastructure that need linting.
  2. Missing luacheck: Neovim Lua configuration validation was removed without replacement in pre-commit
  3. Incomplete fish test: The new fish shell test only checks basic initialization but doesn't validate autosuggestions or other features like the previous zsh test did

🔴 Potential Bugs

  1. Line 70-84: Fish shell test syntax issue - uses bash-style conditional (if test -n) which might need adjustment for proper fish syntax
  2. Missing error handling: No fallback if pre-commit hooks aren't properly installed or configured

⚠️ Performance Considerations

  • Pro: Removing macOS jobs cuts CI time approximately in half
  • Con: Loss of cross-platform validation could lead to platform-specific issues being discovered later

🔒 Security Concerns

  • ✅ Maintains detect-secrets in pre-commit configuration
  • ✅ No new security vulnerabilities introduced

📊 Test Coverage

Critical Gap: Removing macOS testing eliminates cross-platform validation. Given that dotfiles are used across platforms (per CLAUDE.md), this could lead to:

  • Undetected macOS-specific issues
  • Brewfile validation only on Linux (brew behaves differently on macOS)
  • Platform-specific template issues going unnoticed

📝 Recommendations

  1. Add missing linters to pre-commit:

    - repo: https://github.com/shellcheck-py/shellcheck-py
      rev: v0.10.0.1
      hooks:
        - id: shellcheck
  2. Consider matrix strategy instead of removing macOS:

    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest]
    runs-on: ${{ matrix.os }}
  3. Enhance fish shell test to match previous zsh coverage:

    • Test autosuggestions/completions
    • Verify mise integration
    • Check starship prompt initialization
  4. Add pre-commit validation step:

    - name: Validate pre-commit config
      run: pre-commit validate-config

Verdict

While the simplification has merit, the loss of cross-platform testing and missing linter coverage presents risks. I recommend either:

  1. Keeping minimal macOS testing (even if just the lint job), OR
  2. Ensuring all removed linters are properly configured in pre-commit before merging

The PR achieves its goal of simplification but may have gone too far in removing essential validations for a cross-platform dotfiles repository.

@laurigates
laurigates merged commit a264a61 into main Sep 15, 2025
@laurigates
laurigates deleted the ci-smoke-test-revision branch September 15, 2025 07:09
laurigates added a commit that referenced this pull request Aug 19, 2026
…368)

## 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

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant