pub struct TaskGraph {
pub id: GraphId,
pub goal: String,
pub tasks: Vec<TaskNode>,
pub status: GraphStatus,
pub default_failure_strategy: FailureStrategy,
pub default_max_retries: u32,
pub created_at: String,
pub finished_at: Option<String>,
pub durable_save_generation: u32,
}Expand description
A directed acyclic graph of tasks to be executed by the orchestrator.
Created by the Planner and driven to completion by the DagScheduler.
The tasks vec is the authoritative store; all indices (TaskId) reference
positions within it.
§Examples
use zeph_orchestration::{TaskGraph, TaskNode, GraphStatus, FailureStrategy};
let mut graph = TaskGraph::new("build and deploy service");
assert_eq!(graph.status, GraphStatus::Created);
assert_eq!(graph.default_failure_strategy, FailureStrategy::Abort);
assert_eq!(graph.default_max_retries, 3);Fields§
§id: GraphIdUnique graph identifier (UUID v4).
goal: StringHigh-level user goal that was decomposed into this graph.
tasks: Vec<TaskNode>All task nodes. Index i must satisfy tasks[i].id == TaskId(i).
status: GraphStatusCurrent lifecycle status of the graph as a whole.
default_failure_strategy: FailureStrategyGraph-wide failure strategy applied when a task has no per-task override.
default_max_retries: u32Graph-wide maximum retry count applied when a task has no per-task override.
created_at: StringISO-8601 UTC timestamp of graph creation.
finished_at: Option<String>ISO-8601 UTC timestamp set when the graph reaches a terminal status.
durable_save_generation: u32Monotonically incrementing counter used by the durable P2 adapter to key each
budget snapshot to a unique ExecutionId. Zero on creation; incremented on each
journal_budget call so a resumed-then-re-paused plan writes to a fresh execution
rather than overwriting the previous one (see zeph-orchestration/src/durable.rs).
Persisted inside the graph blob so it survives across process restarts.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TaskGraph
impl<'de> Deserialize<'de> for TaskGraph
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 TaskGraph
impl RefUnwindSafe for TaskGraph
impl Send for TaskGraph
impl Sync for TaskGraph
impl Unpin for TaskGraph
impl UnsafeUnpin for TaskGraph
impl UnwindSafe for TaskGraph
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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::Request