pub enum Interruption {
TowerRestart,
LostContact,
Timeout,
Crashed {
exit_code: Option<i32>,
},
GroundStop,
}Expand description
Why a run stopped without finishing.
Variants§
TowerRestart
The Tower went away — a restart, a crash, a reboot — while the run was live.
LostContact
The Tower stayed up but lost contact with the child: its pipes closed unexpectedly, or a suspend and resume left the handle unusable.
Deliberately distinct from Interruption::Crashed, which is what the Tower reports when
it watched the process exit. Here it did not, and the difference is the whole question:
losing sight of a process is not the same as the process ending.
Timeout
The run exceeded timeout_sec.
Crashed
The process exited non-zero.
GroundStop
A Ground Stop halted it.
Implementations§
Source§impl Interruption
impl Interruption
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Returns true when restarting the work could plausibly succeed.
A Ground Stop is excluded deliberately: somebody pulled the handle, and a factory that restarts through its own kill switch is not one anybody can stop.
Sourcepub fn child_may_still_be_running(&self) -> bool
pub fn child_may_still_be_running(&self) -> bool
Returns true when the child process might still be running.
This is the difference between an interruption the Tower observed and one it merely inferred. A timeout or a non-zero exit means the Tower watched the process end. A Tower restart or a lost pipe means only that the Tower stopped being able to see it — and on Windows in particular a child routinely outlives the parent that spawned it.
Recovering in that state is how one interrupted publisher becomes two open pull requests.
So these interruptions require the child to be confirmed gone before a new run is started;
see authorize_recovery.