pub struct GraphComposition { /* private fields */ }Expand description
A canonical ordinary graph plus its deterministic executor source map.
Compilation lowers shared-state calls and finite loops into existing nodes and edges. Generated IDs use full SHA-256, binding the parent descriptor, template revision, call-site, repeat policy, iteration, and source node. In-flight runs therefore cannot silently adopt another template or bound. No new checkpoint grammar, process-local loop counter, or nested driver is involved. Existing canonical bytes are unchanged when no calls are supplied.
Implementations§
Source§impl GraphComposition
impl GraphComposition
Sourcepub fn compile<I>(
parent: CompiledGraph,
calls: I,
) -> Result<Self, GraphCompositionError>where
I: IntoIterator<Item = GraphSubgraphCall>,
pub fn compile<I>(
parent: CompiledGraph,
calls: I,
) -> Result<Self, GraphCompositionError>where
I: IntoIterator<Item = GraphSubgraphCall>,
Replaces all declared call-sites and validates the complete result.
Input/state/update/output schemas and reducer references must match exactly. The parent’s parallelism ceiling must not exceed any template’s ceiling, a conservative enforceable bound for shared-state composition. Every loop iteration counts against the 1,024-node graph ceiling before allocation. The existing route, ready-set, and byte ceilings also apply.
§Errors
Rejects duplicate/absent call-sites, schema/reducer drift, missing or extra return routes, resource exhaustion, and invalid expanded graphs.
Sourcepub const fn graph(&self) -> &CompiledGraph
pub const fn graph(&self) -> &CompiledGraph
Returns the exact graph to register and admit into durable storage.
Sourcepub fn node_sources(
&self,
) -> impl ExactSizeIterator<Item = (&NodeId, &GraphNodeSource)>
pub fn node_sources( &self, ) -> impl ExactSizeIterator<Item = (&NodeId, &GraphNodeSource)>
Returns generated IDs and source roles in canonical generated-ID order.
Sourcepub fn node_source(&self, node_id: &NodeId) -> Option<&GraphNodeSource>
pub fn node_source(&self, node_id: &NodeId) -> Option<&GraphNodeSource>
Looks up one generated role; ordinary parent nodes have no source entry.
Sourcepub fn into_graph(self) -> CompiledGraph
pub fn into_graph(self) -> CompiledGraph
Consumes the composition after executable source bindings are installed.