pub enum LifecycleEvent {
Started,
Resumed {
from_checkpoint: bool,
},
Completed,
}Expand description
Pipeline lifecycle events (start, stop, resume).
These events control the overall pipeline execution lifecycle, distinct from phase-specific transitions. Use these for:
- Starting or resuming a pipeline run
- Completing a successful pipeline execution
§When to Use
Started: When a fresh pipeline run beginsResumed: When resuming from a checkpointCompleted: When all phases complete successfully
§⚠️ FROZEN - DO NOT ADD VARIANTS ⚠️
This enum is FROZEN. Adding new variants is PROHIBITED.
§Why is this frozen?
Lifecycle events control pipeline flow (start/stop/completion). Allowing effect handlers to emit new lifecycle events would violate the core architectural principle: handlers describe what happened; reducers decide what happens next.
§What to do instead
If you need to express new observations or failures:
-
Reuse existing phase/category events - Use
PlanningEvent,DevelopmentEvent,ReviewEvent,CommitEvent, etc. to describe what happened within that phase. Example:PlanningEvent::PlanXmlMissinginstead of creating a generic “Aborted” event. -
Return errors from the event loop - For truly unrecoverable failures (permission errors, invariant violations), return
Errfrom the effect handler. The outer runner will handle termination, not the reducer. -
Handle in orchestration - Some conditions don’t need events at all and can be handled in the effect handler or runner logic.
§Enforcement
The freeze policy is enforced by the lifecycle_event_is_frozen test in this module,
which will fail to compile if new variants are added. This is intentional.
Variants§
Started
Pipeline execution started fresh (not from checkpoint).
Resumed
Pipeline execution resumed from a previous state.
Completed
Pipeline execution completed successfully.
Trait Implementations§
Source§impl Clone for LifecycleEvent
impl Clone for LifecycleEvent
Source§fn clone(&self) -> LifecycleEvent
fn clone(&self) -> LifecycleEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LifecycleEvent
impl Debug for LifecycleEvent
Source§impl<'de> Deserialize<'de> for LifecycleEvent
impl<'de> Deserialize<'de> for LifecycleEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for LifecycleEvent
impl RefUnwindSafe for LifecycleEvent
impl Send for LifecycleEvent
impl Sync for LifecycleEvent
impl Unpin for LifecycleEvent
impl UnwindSafe for LifecycleEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more