pub enum LifecycleEvent<'a> {
Registered {
workspace: &'a WorkspaceId,
run: &'a RunId,
occurrence: &'a str,
graph: &'a GraphDescription,
parent: Option<&'a ActionContext>,
lineage: Option<&'a RunLineage>,
},
ChildFinished {
parent: &'a ActionContext,
snapshot: &'a RunSnapshot,
},
ExecuteStarted {
run: &'a RunId,
occurrence: &'a str,
},
ExecuteFinished {
snapshot: &'a RunSnapshot,
failure: Option<&'a WorkflowFailure>,
},
StepStarted {
context: &'a ActionContext,
state: &'a WorkflowState,
inputs: &'a Map<String, Value>,
},
StepFinished {
context: &'a ActionContext,
outcome: Option<Result<&'a ActionOutcome, &'a WorkflowFailure>>,
checkpoint: &'a Checkpoint,
},
StreamStarted {
context: &'a ActionContext,
span: Option<&'a str>,
},
StreamItem {
context: &'a ActionContext,
span: Option<&'a str>,
index: usize,
result: &'a Map<String, Value>,
},
StreamFinished {
context: &'a ActionContext,
span: Option<&'a str>,
items: usize,
failure: Option<&'a WorkflowFailure>,
},
SpanStarted {
context: &'a ActionContext,
id: &'a str,
name: &'a str,
parent: Option<&'a str>,
dependencies: &'a [String],
},
SpanAttribute {
context: &'a ActionContext,
span: Option<&'a str>,
key: &'a str,
value: &'a Value,
tags: &'a Map<String, Value>,
},
SpanFinished {
context: &'a ActionContext,
id: &'a str,
},
}Expand description
An exhaustive borrowed view of one application lifecycle event.
Variants§
Registered
Registers a run and its graph with optional child or restore lineage.
Fields
workspace: &'a WorkspaceIdWorkspace containing the run.
graph: &'a GraphDescriptionGraph used by the registered run.
parent: Option<&'a ActionContext>Parent action when this is an admitted child.
lineage: Option<&'a RunLineage>Original boundary when this is a restored run.
ChildFinished
Finishes an admitted child under its exact parent action.
Fields
parent: &'a ActionContextParent action that admitted this child.
snapshot: &'a RunSnapshotAuthoritative child snapshot.
ExecuteStarted
Begins one execution session.
ExecuteFinished
Finishes one execution session.
Fields
snapshot: &'a RunSnapshotAuthoritative run snapshot at session finalization.
failure: Option<&'a WorkflowFailure>Execution failure, when present.
StepStarted
Begins an action attempt against its committed base and resolved inputs.
Fields
context: &'a ActionContextIdentity and attempted action ordinal.
state: &'a WorkflowStateUnchanged committed base state.
StepFinished
Finalizes an attempt, including rollback with no completed outcome.
Fields
context: &'a ActionContextIdentity and attempted ordinal, including failed attempts.
outcome: Option<Result<&'a ActionOutcome, &'a WorkflowFailure>>Committed result, exact failure, or no outcome on EOF, abort or Drop.
checkpoint: &'a CheckpointCommitted boundary; failure retains the unchanged prior boundary.
StreamStarted
Opens partial-result observation for one action or addressed span.
Fields
context: &'a ActionContextAction owning this stream.
StreamItem
Observes one transient partial result.
Fields
context: &'a ActionContextAction owning this stream.
StreamFinished
Closes partial-result observation exactly once.
Fields
context: &'a ActionContextAction owning this stream.
failure: Option<&'a WorkflowFailure>Failure that closed observation, if any.
SpanStarted
Opens an explicitly addressed span within one action attempt.
Fields
context: &'a ActionContextAction owning the span.
SpanAttribute
Adds an attribute to an open span or the action root.
SpanFinished
Closes an addressed span.
Implementations§
Source§impl LifecycleEvent<'_>
impl LifecycleEvent<'_>
Sourcepub fn tracking_records(
&self,
observed_at: SystemTime,
) -> Result<Vec<Value>, AppError>
pub fn tracking_records( &self, observed_at: SystemTime, ) -> Result<Vec<Value>, AppError>
Projects this observation into the pinned rurr tracking JSON records.
This is an explicit content export: inputs, results, state and attributes may be present. The caller owns transport and samples the observation time. No record is retained and no hook is invoked. The complete encoded list is bounded to 1 MiB. Timed records require UTC years 1970 through 9999.
Execute boundaries, child completion and nonfirst partial items have no pinned wire row and return an empty list. Step completion serializes its temporary state projection through the process-global field encoders; the authoritative checkpoint remains unchanged. A step without an outcome has no pinned end-entry state and returns an input error before invoking a field encoder.
use app_kit::workflow::{LifecycleEvent, RunId};
let run: RunId = "run_8a7c251e-b5b8-4d9e-8f0b-123456789abc".parse()?;
let event = LifecycleEvent::ExecuteStarted {
run: &run, occurrence: "00000000000040008000000000000001",
};
assert!(event.tracking_records(std::time::UNIX_EPOCH)?.is_empty());§Errors
Returns InvalidInput for a step with no outcome, missing graph source,
unsupported timestamp, malformed span attributes, or exceeded record bounds.
Codec errors propagate from state serialization. This explicit export may
contain caller content; it is separate from safe operational tracing.
Auto Trait Implementations§
impl<'a> Freeze for LifecycleEvent<'a>
impl<'a> RefUnwindSafe for LifecycleEvent<'a>
impl<'a> Send for LifecycleEvent<'a>
impl<'a> Sync for LifecycleEvent<'a>
impl<'a> Unpin for LifecycleEvent<'a>
impl<'a> UnsafeUnpin for LifecycleEvent<'a>
impl<'a> UnwindSafe for LifecycleEvent<'a>
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.