@wpkernel/pipeline / RunOutcome
Type Alias: RunOutcome<TNodes, TOutputs, TEffects>
type RunOutcome<TNodes, TOutputs, TEffects> = RunProjection<TNodes, TEffects> &
| {
kind: "succeeded";
outputs: TOutputs;
}
| {
failures: readonly RunFailure<TNodes, TEffects>[];
kind: "failed";
primaryFailure: RunFailure<TNodes, TEffects>;
}
| {
kind: "cancelled";
reason?: unknown;
}
| {
kind: "suspended";
primaryPause: PauseRecord;
suspension: Suspension<TNodes, TOutputs, TEffects>;
};Complete immutable process-local run outcome after graph scheduling and the effect work appropriate to its variant.
nodes is always in compiled canonical graph order. Successful runs commit their prepared journal; failed and cancelled runs perform the applicable reverse-journal compensation. A suspended run instead retains its prepared entries for later resume or abandon: commit and compensation have not been attempted for that suspension.
Node failures are primary by canonical node order. Effect preparation or commit failures retain their logical journal order; compensation and observer failures are contained as evidence and do not replace the triggering error. A suspended outcome carries a live single-use process-local capability, not a serialisable checkpoint.
Type Parameters
TNodes
TNodes extends NodeRegistry
TOutputs
TOutputs extends Readonly<Record<string, GraphValue>>
TEffects
TEffects extends EffectRegistry
