pub struct RuntimeOpsLifecycleRegistry { /* private fields */ }Expand description
Per-runtime shared registry for async operation lifecycle truth.
Per-operation canonical lifecycle state is owned by the DSL authority embedded in the shell. This struct manages I/O concerns: watcher channels, timestamps, peer handles, snapshot assembly, FIFO eviction, and the completion feed buffer.
Implementations§
Source§impl RuntimeOpsLifecycleRegistry
impl RuntimeOpsLifecycleRegistry
pub fn new() -> Self
pub fn with_config(config: OpsLifecycleConfig) -> Self
Sourcepub fn set_persistence_channel(
&self,
tx: UnboundedSender<OpsLifecyclePersistenceRequest>,
epoch_id: RuntimeEpochId,
cursor_state: Arc<EpochCursorState>,
)
pub fn set_persistence_channel( &self, tx: UnboundedSender<OpsLifecyclePersistenceRequest>, epoch_id: RuntimeEpochId, cursor_state: Arc<EpochCursorState>, )
Wire a persistence channel for durable snapshot writes.
After this call, terminal transitions (complete/fail/cancel/abort) capture a snapshot and queue it to the channel. A dedicated persistence task should drain the channel and write to the store.
Sourcepub fn from_recovered(snapshot: PersistedOpsSnapshot) -> Self
pub fn from_recovered(snapshot: PersistedOpsSnapshot) -> Self
Recover from a persisted snapshot.
Rebuilds DSL state (stripping non-terminal ops — only terminals survive recovery), creates fresh shell records from specs, and seeds the feed buffer with persisted completion entries.
Sourcepub fn capture_persistence_snapshot(
&self,
epoch_id: RuntimeEpochId,
cursor_state: &EpochCursorState,
) -> PersistedOpsSnapshot
pub fn capture_persistence_snapshot( &self, epoch_id: RuntimeEpochId, cursor_state: &EpochCursorState, ) -> PersistedOpsSnapshot
Capture a serializable snapshot of the current state for persistence.
Includes authority state, operation specs, completion entries, and cursor values. Cursor values may be stale relative to the agent’s true position (monotonic staleness, not atomicity).
Sourcepub fn completion_feed_handle(&self) -> Arc<dyn CompletionFeed> ⓘ
pub fn completion_feed_handle(&self) -> Arc<dyn CompletionFeed> ⓘ
Return a read handle to the completion feed.