//! Max-runtime (watchdog) config for in-flight routine runs.
//!
//! A run launches its agent in a detached tmux session that nothing otherwise bounds: a hung agent
//! (waiting on stdin, looping, blocked on a stuck network/git op) never exits, so the TTL reaper —
//! which only touches *finished* runs — can never reap it, and each cron tick stacks another zombie
//! session + workbench. The cleanup watchdog force-kills any session whose run has exceeded its
//! routine's max runtime, after which the workbench is reaped under the normal TTL rules.
use Routine;
/// Upper bound on a single run's wall-clock duration before the watchdog kills its session: 1h.
///
/// Mirrors the TTL cap ([`super::ttl::MAX_TTL_SECS`]): a run is only worth keeping alive until the
/// next run is due, and never longer than this. Also the fallback for orphaned workbenches whose
/// routine was since deleted.
pub const MAX_RUNTIME_SECS: u64 = 60 * 60;