Repository navigation
Conversation
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.
There was a problem hiding this comment.
🔵 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--versionshort-circuit inmain()that printsCFBundleShortVersionStringand exits before AppKit initializes. - Run
swift testin the build and release workflows, and add a 20s-bounded launch smoke test on the assembled.app. - Add an "Agent checks" section to
CLAUDE.mdand 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
swift testnow runs in the build workflow and before packaging in the release workflow. Before, CI only built.Beacon --versionprints 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.CLAUDE.mdgets a section with the verify command (swift build && swift test) and a list of files that need extra care.swift buildandswift test.Commits
How it was tested
swift build: ok.swift test: 70 tests pass (68 before, plus 2 new inLaunchArgsTests).actionlinton both workflows: clean.--version: printed1.0.0, exit 0.--versioncheck only fires when it is the sole argument. Any other launch falls through to the old code.Owner steps after merge
Not checked
CLAUDE.mddoes not nameBeaconApp.swiftyet.shellcheckstill shows two old notes in the build scripts; no shell file was changed.