pub enum Lifecycle {
Autonomous,
Interactive,
}Expand description
How a run is driven — its how-run state (design.md §2, §6).
This is an explicit told fact, set once at run create from the
--interactive flag and never transitioned. It is deliberately NOT derived
from Kind: the 0.2 cut removed the code kind that used to carry
interactivity accidentally, and interactivity is now orthogonal to topology —
any run can be marked interactive (told, not guessed, target-state-0.2.md §2/§4). Do not reintroduce a Kind-derived inference; Kind::lifecycle
exists only to seed the default for a run created without the flag.
Lifecycle is a category, not a progress signal — an agent tracking
completion polls manifest.status (Pending | Running | Done | Failed | Cancelled), NEVER lifecycle, whose value never changes (state-integrity
invariant 4).
Variants§
Autonomous
Agent runs to completion unattended; the supervisor adjudicates exit
(the told worker.exited fact, then the residual crash backstop).
Interactive
Human-driven: the supervisor never auto-terminalizes or auto-tears-down
from a dead pid or a worker exit — it waits for an explicit run merge
(→ teardown) or run cancel. The human owns the whole lifecycle
(design.md §6).
Implementations§
Source§impl Lifecycle
impl Lifecycle
Sourcepub fn is_interactive(self) -> bool
pub fn is_interactive(self) -> bool
True for Lifecycle::Interactive — the human-driven, supervisor-hands-off
how-run state. The single predicate the supervisor consults to suppress its
automatic terminalization/teardown machinery (design.md §6).