fix(cli): keep session reverts atomic - #12587
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge All issues from the previous review round were addressed in this update: Files Reviewed (3 files)
Previous Review Summary (commit 16f8e7e)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 16f8e7e)Status: 5 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)CRITICAL
WARNING
SUGGESTION
Files Reviewed (5 files)
Reviewed by claude-sonnet-5 · Input: 40 · Output: 19K · Cached: 1.2M Review guidance: REVIEW.md from base branch |
…ert-file-rollback-bug fix(cli): keep session reverts atomic
Revert currently records a conversation rewind even when an individual snapshot checkout fails. A locked or unwritable path can therefore leave only part of the workspace restored while the UI reports the entire checkpoint as reverted.
Snapshot restoration now validates checkpoint trees before mutation and treats checkout, restore, and deletion failures as fatal. Revert, replacing an existing revert, and Unrevert all run as compensated transitions: they capture a durable baseline, restore only the checkpoint patch paths through the snapshot service, and preserve both the original and rollback failure causes. Conversation state is persisted only after every affected file reaches the requested checkpoint.
Fixes #11864