Skip to content

fix(correct): graceful message when a batch correction rolls back (refs #1)#33

Merged
tenfourty merged 1 commit into
mainfrom
fix/cow-rollback-message
Jun 24, 2026
Merged

fix(correct): graceful message when a batch correction rolls back (refs #1)#33
tenfourty merged 1 commit into
mainfrom
fix/cow-rollback-message

Conversation

@tenfourty

Copy link
Copy Markdown
Owner

Polish for the COW rollback path (#1). When a batch correct --apply fails mid-write, apply_corrections already restores all files (all-or-nothing); this makes the CLI report a clean "correction failed and was rolled back — no files were changed" instead of an uncaught OSError traceback. Test: mocked OSError from correct_term → exit 1 + graceful message. ruff + mypy clean.

#1)

When apply_corrections rolls a failed batch back (COW atomicity), the correct
command now reports a clean "correction failed and was rolled back — no files
were changed" instead of surfacing an uncaught OSError traceback. The data was
already safe; this just makes the rare failure path user-friendly.
@tenfourty tenfourty merged commit 6df1412 into main Jun 24, 2026
8 checks passed
@tenfourty tenfourty deleted the fix/cow-rollback-message branch June 24, 2026 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant