ic_backup/view/execution_workflow/mod.rs
1//! Sequential inspection of original workflow journals, without execution authority.
2
3use crate::{
4 model::artifacts::ArtifactChecksumRecord, policy::execution_progress::ExecutionProgressView,
5};
6use serde::Serialize;
7
8/// Local projection of every declared stage, including unresolved original attempts.
9///
10/// No absent stage implies unused authority. Applied child journals alone do not
11/// establish a checkpoint, artifact completeness, product terminal or safe release.
12#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
13pub struct ExecutionWorkflowProgressView {
14 /// Exact original workflow identity.
15 pub workflow: ArtifactChecksumRecord,
16 /// One row per original stage in dependency planning order.
17 pub stages: Vec<ExecutionStageProgressView>,
18}
19
20/// One allocated stage and its retained local condition.
21#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
22pub struct ExecutionStageProgressView {
23 /// Original opaque stage identity, never an array index.
24 pub stage_sequence: u64,
25 /// Absent or admitted complete child journals; no state is dispatch permission.
26 pub state: ExecutionStageProgressState,
27}
28
29/// Original local stage evidence, with no invented missing journals or receipts.
30#[derive(Clone, Debug, Eq, PartialEq, Serialize)]
31#[serde(tag = "state", rename_all = "snake_case")]
32pub enum ExecutionStageProgressState {
33 /// The original derived stage path is absent. This proves no never-dispatched custody.
34 Unprepared,
35 /// Exact child plan, binding, ancestors and complete original journals were admitted.
36 Prepared {
37 /// Observed retained binding, not independently qualified learned evidence.
38 binding: ArtifactChecksumRecord,
39 /// Current original accounting, including both pending reservation lanes.
40 progress: Box<ExecutionProgressView>,
41 },
42}