Skip to content

chore: add agent checks, CI tests and launch smoke test - #2

Open
SNGWN wants to merge 3 commits into
mainfrom
chore/ai-process-gaps
Open

SNGWN wants to merge 3 commits into
mainfrom
chore/ai-process-gaps

Conversation

@SNGWN

@SNGWN SNGWN commented Oct 27, 2026

Copy link
Copy Markdown
Member

Summary

  • CI runs the tests: swift test now runs in the build workflow and before packaging in the release workflow. Before, CI only built.
  • Launch smoke test: Beacon --version prints the app version and exits before any UI starts. CI runs the built app with it (20 second limit) and fails on a non-zero exit or empty output.
  • Agent checks: CLAUDE.md gets a section with the verify command (swift build && swift test) and a list of files that need extra care.
  • The README build note now says CI gates on swift build and swift test.

Commits

  • ci(workflows): run swift test in build and release (gap G2)
  • docs(claude): add Agent checks section (gaps G7, G9)
  • test(app): add --version flag and CI launch smoke test (gap G19)

How it was tested

  • swift build: ok. swift test: 70 tests pass (68 before, plus 2 new in LaunchArgsTests).
  • actionlint on both workflows: clean.
  • Built app run with --version: printed 1.0.0, exit 0.
  • The --version check only fires when it is the sole argument. Any other launch falls through to the old code.

Owner steps after merge

  • Optional: make the "build" check required in branch protection.

Not checked

  • The macos-14 runner itself (its Xcode version). If CI fails on XCTest, check which Xcode the runner selects.
  • The smoke step has not run in CI yet.
  • The critical-paths list in CLAUDE.md does not name BeaconApp.swift yet.
  • shellcheck still shows two old notes in the build scripts; no shell file was changed.

SNGWN added 3 commits October 27, 2026 21:57
Tests passed on the base (68 tests) but CI never ran them.
Gives agents one verify command and the list of critical paths.
--version prints the version and exits before any UI starts. All other launches are unchanged.
Copilot AI balanced review requested due to automatic review settings October 27, 2026 19:27

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.

🔵 Needs a closer look

It modifies .github/workflows/**, which CLAUDE.md designates as Critical-stakes paths that must never be auto-merged and require human sign-off.

No open issues 🎉

What changed in this PR

This PR hardens CI and agent workflows for Beacon, a native macOS menu-bar bandwidth utility. Previously CI only built the project; this change makes swift test gate both the build and release workflows and adds a lightweight launch smoke test via a new --version flag that prints the app version and exits before any UI starts. It also documents an "Agent checks" section (verify command + critical-paths list) in CLAUDE.md and syncs the README build note.

Changes:

  • Add a pure, testable BeaconMain.wantsVersion(_:) and a --version short-circuit in main() that prints CFBundleShortVersionString and exits before AppKit initializes.
  • Run swift test in the build and release workflows, and add a 20s-bounded launch smoke test on the assembled .app.
  • Add an "Agent checks" section to CLAUDE.md and update the README build note.
File Description
Sources/​Beacon/​BeaconApp.swift Adds pure wantsVersion helper and a --version path that prints the version and exits before UI/monitoring start.
Tests/​BeaconTests/​LaunchArgsTests.swift New unit tests for wantsVersion covering the sole-flag, no-args, other-args, and injected-arg cases.
.github/​workflows/​build.yml Adds a swift test step and a perl-bounded --version launch smoke test on the built app.
.github/​workflows/​release.yml Runs swift test before packaging the release.
README.md Updates the build note to state CI gates on swift build and swift test.
CLAUDE.md Adds an "Agent checks" section (verify command + critical-paths list) and updates the release-build comment.

Review effort: Balanced

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.

2 participants