Module recovery

Module recovery 

Source

Functions§

compensate_unresolved
Resume any unresolved sagas left over from a prior srv-process run. Returns the number of sagas the recovery layer touched (compensated or marked failed_compensation).
derive_inverse_command
Map a forward Command to its compensating inverse, given the recorded step row (which carries the forward command’s emitted events in output_json, useful for Create* → extract-new-id → Delete*).
dispatch_inverse 🔒
Dispatch a recovery-time compensating command + apply its events to wstore. Mirrors SagaCtx::compensate but standalone (no live saga to attach to). Returns the emitted events on success, the reducer’s error message on rejection.
extract_block_id_from_output 🔒
extract_tab_id_from_output 🔒
extract_workspace_id_from_output 🔒
Pull the first WorkspaceCreated.workspace_id from a step’s emitted events. Used to derive CreateWorkspace’s inverse.
recover_saga 🔒
Compensate a single unresolved saga. Walks succeeded steps in reverse, dispatches the inverse of each through the reducer, and marks the saga compensated on success.