Skip to content

v3.6.96

Choose a tag to compare

@alex-solovyev alex-solovyev released this 05 Apr 06:28
· 11812 commits to main since this release

Fixed

  • Add PID file guard to contribution-watch-helper.sh scan mode to prevent multiple concurrent instances when launched via launchd StartInterval (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-cleaned
  • cmd_scan(): refuses to start if another scan is running
  • stop: graceful stop with 5s timeout → SIGKILL
  • restart: stop + start
  • uninstall: now also cleans PID file
  • Trap on EXIT/INT/TERM: PID file cleaned on crash/Ctrl+C
  • 11 new tests covering all guard paths