Description
Found while fixing #3162 (PR #3186), left out of scope there.
staleCommandReaper uses a fixed 300s deadline for every command, regardless of the script's own timeoutSeconds. A legitimately long-running script is therefore reaped and reported as stale while it is still executing correctly, and a script with a short timeout is left pending far longer than its own contract allows.
Proposed Fix
Have the reaper honour the originating script's timeoutSeconds (with a sane floor/ceiling and a margin for agent round-trip) instead of the fixed 300s.
Notes
Related family: #3097 (reaper claiming "no response from agent" when the agent replied). Worth checking whether the two want a single change to the reaper's deadline logic.
Description
Found while fixing #3162 (PR #3186), left out of scope there.
staleCommandReaperuses a fixed 300s deadline for every command, regardless of the script's owntimeoutSeconds. A legitimately long-running script is therefore reaped and reported as stale while it is still executing correctly, and a script with a short timeout is left pending far longer than its own contract allows.Proposed Fix
Have the reaper honour the originating script's
timeoutSeconds(with a sane floor/ceiling and a margin for agent round-trip) instead of the fixed 300s.Notes
Related family: #3097 (reaper claiming "no response from agent" when the agent replied). Worth checking whether the two want a single change to the reaper's deadline logic.