mirror of
https://github.com/storytold/lightcraft.git
synced 2026-12-05 00:11:17 -05:00
40f2dc93e2
Catalog::apply rolled a failed batch back with `let _ = apply_inner(inv)`. When an inverse failed, the catalog stayed changed but apply returned a plain error, so Session::commit skipped the journal record and the undo step: a restart replayed the old state and the change could not be undone. The failed inverses are now kept and returned in CatalogError::PartlyApplied, with what is left of the rollback. Session::commit journals the batch (replaying it fails the same way and leaves the same changes) and makes the remainder its undo step. Journal replay counts such a record as replayed. apply_system and a failing undo or redo journal it too.