Skip to content

Function: executeHierarchicalRewindDrain() ​

ts
function executeHierarchicalRewindDrain<TIn, THandle>(params): Promise<{
  deferredWhileSuspended: boolean;
}>;

Defined in: runtime/flow/internal/flow-replace-and-rewind.ts:149

Executes the 4-step Hierarchical Rewind Drain Barrier across active child forks, speculations, human requests, and run overlays (SPEC.md §3.10).

If the run is currently 'SUSPENDED', records rewindPendingToStepId on the ledger without executing onRewindHook until prerequisites complete (SPEC.md §3.7.2 & §3.10).

Type Parameters ​

Type ParameterDefault typeDescription
TInunknownValidated flow input payload type.
THandleunknownRuntime handle type of the active isolation scope.

Parameters ​

ParameterTypeDescription
paramsHierarchicalRewindDrainParams<TIn, THandle>Rewind drain barrier parameters.

Returns ​

Promise<{ deferredWhileSuspended: boolean; }>

Whether the rewind was deferred while 'SUSPENDED'.

Released under the MIT License.