Roll back in-memory mutations when saving fails #12
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: phg/hosts#12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Several TUI workflows mutate the in-memory Hosts File before calling
HostsManager.save_hosts_file. When the save fails, add, delete, move, toggle, edit, or DNS workflows can leave the display changed while/etc/hostsremains unchanged. A later successful save can then persist state the user was told had failed.Issue #7 separately covers making undo and redo persist immediately. This issue establishes the failure invariant for all mutations: failed persistence restores the pre-action model and UI state.
Acceptance criteria
/etc/hosts.