You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fleet Orphan Reaper Identity Check Relies on /proc — No macOS Fallback #2256
The fleet orphan reaper in src/autoskillit/cli/fleet/_fleet_lifecycle.py:113-114 uses read_starttime_ticks(pid) from core/runtime/_linux_proc.py to verify PID identity before killing an orphan process. On macOS, /proc does not exist, so read_starttime_ticks() returns None.
The identity guard:
current_ticks=read_starttime_ticks(pid)
ifcurrent_ticksisnotNoneandcurrent_ticks==dispatch.dispatched_starttime_ticks:
# KILL path — only reached on Linuxelse:
# "reaped_pid_recycled" path — NO KILL issued
When current_ticks is None (macOS), the guard evaluates False, the reaper takes the else branch, marks the dispatch as reaped_pid_recycled, and never sends a signal to the orphan process. This is a silent behavioral gap, not an intentional design choice.
Failure Chain
Test writes dispatched_starttime_ticks=0 (because read_starttime_ticks returns None on macOS, collapsed via or 0)
When current_ticks is None (non-Linux), fall back to psutil.Process(pid).create_time() for cross-platform PID-reuse detection. Both dispatched_starttime_ticks and the current check would use the same cross-platform API. This is already available via psutil on all platforms.
Alternatively, on non-Linux where /proc identity is unavailable, treat the process as the original orphan (assume no PID recycling) and proceed with the kill — PID-reuse protection is already degraded without /proc.
Activity