mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-18 08:25:34 +00:00
CodeRabbit catch on PR #3434: stamp_save() ran before the fallible save_path_with(), so a failed write (no permission, disk full, a bad path) still bumped the document's modified time, revision, author and zoom, as if it had actually been saved. A later successful save would then persist those stale stamps for a write that never happened. Snapshot the stamped fields before stamp_save() and restore them if save_path_with() errors, before propagating the failure. Added a_failed_save_leaves_the_save_stamps_untouched in crates/engine/src/tests.rs. cargo test -p wordcraft-engine --lib: 789 passed. clippy -p wordcraft-engine --lib --tests -D warnings: clean. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>