v3.6.96
Fixed
- Add PID file guard to
contribution-watch-helper.shscan mode to prevent multiple concurrent instances when launched via launchdStartInterval(GH#17415, PR #17418)
Details
When sh.aidevops.contribution-watch launchd plist fires on a fixed StartInterval, if a scan is still running when the next interval fires, two instances would run concurrently — wasting GitHub API quota and potentially corrupting the JSON state file.
This release adds the same PID-file guard pattern as GH#17408 (memory-pressure-monitor.sh):
- PID file:
~/.aidevops/.pid/contribution-watch.pid _is_scan_running(): checks if stored PID is alive; stale files auto-cleanedcmd_scan(): refuses to start if another scan is runningstop: graceful stop with 5s timeout → SIGKILLrestart: stop + startuninstall: now also cleans PID file- Trap on EXIT/INT/TERM: PID file cleaned on crash/Ctrl+C
- 11 new tests covering all guard paths