Repository navigation
Commit 2d10fac
committed
fix(cron): remove /2 divisor from pre-execution watchdog formula
The pre-execution (stale-progress) watchdog uses
Math.min(CAP, Math.floor(jobTimeoutMs / 2)) to determine when to abort a
cron job that has not emitted a new execution phase event. The /2 divisor
means a job configured with timeoutSeconds: 600 is silently killed at 300s
if the tool execution produces no intermediate phase events.
This affects any shell command that runs silently for its entire duration:
rclone sync, rsync, pg_dump, large file transfers, etc. The Codex process
spawns the tool, the tool runs, and eventually returns output — but during
that window the stale-progress watchdog fires at half the job timeout.
Remove the /2 divisor so the pre-execution watchdog respects the full job
timeout. The job-level timeout already provides the hard upper bound; the
stale-progress detector should not impose a stricter one for silent but
active processes.
Before: rclone sync killed at 300s (half of 600s job timeout)
After: rclone sync completes at ~301s (durationMs=300967 aborted=false)
Fixes #831101 parent 2ab7624 commit 2d10fac
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
| 393 | + | |
394 | 394 | | |
395 | 395 | | |
396 | 396 | | |
| |||
0 commit comments