Skip to main content

Module plan

Module plan 

Source
Expand description

plan — execution-plan.md reference implementation.

run_plan(plan, ops, exec): execute stage groups sequentially, interpret null-binding skip, Skip propagation, and Error Policy Kind (fail/retry/continue) to produce a deterministic result tree. Node execution is delegated to exec.

Bounded parallel stage execution (bc#23, execution-plan.md §4.1): run_plan_parallel additionally dispatches the members of a stage on scoped worker threads, bounded by plan.concurrency, while COMMITTING interpretation (Skip / Policy Kind / Failure) in ascending index order — the observed result (tree / executed / skipped / failure code+message) is byte-identical to run_plan. It requires exec: Fn + Sync (callable from multiple threads), which is why it is a separate, additive entry point: run_plan keeps the FnMut seam (and stays sequential — a conforming §4.1 fallback) so existing consumers, including crate::behavior::run_behavior’s stateful exec closure, are untouched.

Structs§

ErrorDetail
The structured, recoverable payload a Failure carries (scp-error.md).
ExecutionPlanSpec
OpSpec
PlanFailure
RunResult

Enums§

ElementPolicyKind
Element Error Policy Kind (scp-error.md “The Element Error Policy”). A map node property: whether an element’s Failure becomes the map’s Component Failure (Error, the default) or the failing element is dropped and the rest proceed (Skip, order preserved).
ErrorKind
What went wrong (a closed set). An unrecognized kind fails closed rather than degrading to a default.
ExecOutcome
consumer-supplied node execution outcome (mock).
PlanFailureCode
PolicyKind
RelationKind

Functions§

run_plan
Run the plan. exec(op, bound_value) returns the node outcome (mock).
run_plan_parallel
Bounded parallel variant of run_plan (bc#23).