compensate_via_reducer

Function compensate_via_reducer 

Source
async fn compensate_via_reducer(
    state: &AppState,
    cmd: Command,
    store: &WaveStore,
)
Expand description

Compensation helper: dispatch a command into the reducer and apply its emitted events to wstore best-effort. Used when an earlier sync apply partially wrote SQLite and we need to undo the leaked rows. SQLite errors during compensation are logged but ignored — the caller is already returning an error to the client; throwing on the cleanup just hides the original cause. (codex P1 + reagent P2 #616 — partial-write cleanup.)