Roll back multi-file saves on partial failure #14

Open
opened 2026-06-06 19:58:12 +00:00 by tonym · 0 comments

Severity: medium
Category: data-integrity
Location: app.py:1222-1232,1436-1463,1555-1563,1630-1635,2029-2035

Problem

Routes that write two files (debts+bills, funds+weekly) have no rollback; if the second save fails the files are left inconsistent (e.g. BNPL count incremented but bill not marked paid).

Suggested fix

Snapshot pre-mutation state and revert on failure, or consolidate to a single store / SQLite.

Filed by automated code review.

**Severity:** medium **Category:** data-integrity **Location:** `app.py:1222-1232,1436-1463,1555-1563,1630-1635,2029-2035` ### Problem Routes that write two files (debts+bills, funds+weekly) have no rollback; if the second save fails the files are left inconsistent (e.g. BNPL count incremented but bill not marked paid). ### Suggested fix Snapshot pre-mutation state and revert on failure, or consolidate to a single store / SQLite. _Filed by automated code review._
tonym added the
data-integrity
severity:medium
labels 2026-06-06 19:58:12 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bonna61/Moon-Household-Budget#14
No description provided.