Fix LaunchOnlyOnce contradiction in key rotation LaunchAgent - #18
Merged
shawntz merged 3 commits intoJan 11, 2026
Merged
Conversation
18 tasks
Co-authored-by: shawntz <5200266+shawntz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update background key rotation implementation based on feedback
Fix LaunchOnlyOnce contradiction in key rotation LaunchAgent
Dec 13, 2025
shawntz
marked this pull request as ready for review
December 19, 2025 09:53
There was a problem hiding this comment.
Pull request overview
This PR fixes a contradictory configuration in the com.shawnschwartz.cassh.rotate.plist LaunchAgent that controls hourly SSH key rotation. The plist had LaunchOnlyOnce=false with a comment claiming "Don't run if already running," but setting this key to false actually allows concurrent instances when the StartInterval timer fires.
Key changes:
- Removed the
LaunchOnlyOncekey entirely to rely on launchd's default behavior - Removed the misleading comment that contradicted the configuration
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
|
fizzy |
shawntz
approved these changes
Jan 11, 2026
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.
Description
The
com.shawnschwartz.cassh.rotate.plistLaunchAgent hadLaunchOnlyOnce=falsewith a comment stating "Don't run if already running" — contradictory behavior. SettingLaunchOnlyOnce=falseallows launchd to spawn concurrent instances whenStartIntervalfires.Changed:
LaunchOnlyOncekey (defaults to preventing concurrent runs forStartIntervaljobs)The default behavior now correctly prevents overlapping key rotation executions without requiring lock file implementation.
Type of Change
Related Issues
Part of #7 feedback
How Has This Been Tested?
Test environment:
Checklist
Security Considerations
Screenshots (if applicable)
N/A
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.