Skip to main content

log_older_running_instances

Function log_older_running_instances 

Source
pub fn log_older_running_instances(
    channels_root: &Path,
    own_channel: &str,
    own_version: &str,
)
Expand description

Enumerate sibling instances, probe each for liveness, and log (via crate::logging::log) every LIVE instance running a strictly OLDER version than own_version. Never prompts, never blocks, never sends anything beyond the liveness probe itself. Intended to be called from a detached/spawned task at startup — every failure path here is a no-op, so there is nothing for the caller to react to.

own_version should be the plain on-disk version string (the directory name under versions/, i.e. CARGO_PKG_VERSION — NOT AGENTMUX_BUILD_LABEL, which only affects the pipe name, not the data-dir layout). We can’t know a sibling’s build label from its directory name alone, so sibling pipe hashes are always computed from the plain on-disk version string; this correctly finds stable/ portable release siblings (no build label) and simply under-detects same-machine LOCAL dev builds — a safe false-negative, never a false alarm.