Treasury & Bank Transfer Management System — سامانه مدیریت خزانه‌داری و حواله‌های بانکی

Document fail-closed rejection of imprecise legacy 64-bit IRR during verified recovery

davoodmehraban89 committed Oct 23, 2026 at 15:14 UTC 02ba2f0c0c5a639b66f5231de9d6458e80e0c985
1 file changed +1 -1
docs/V7_LOCAL_SQLITE_BACKUP_RECOVERY.md
+1 -1
@@ -16,7 +16,7 @@ node --experimental-strip-types scripts/treasury-sqlite-recovery.mjs verify /sec
16 node --experimental-strip-types scripts/treasury-sqlite-recovery.mjs restore-new /secure/new-backup.sqlite /path/to/new-recovery.sqlite
17 ```
18
19 -The backup uses SQLite `VACUUM INTO` for a consistent committed snapshot, even when the source has WAL activity. It validates `PRAGMA integrity_check`, required schema tables and exact schema version. The destination is created exclusively: **an existing file, including a zero-byte file, is never overwritten**. Restore works **only to a new filename** and does not modify the active database.
19 +The backup uses SQLite `VACUUM INTO` for a consistent committed snapshot, even when the source has WAL activity. It validates `PRAGMA integrity_check`, required schema tables, exact schema version and financial amounts within JavaScript's precisely representable integer range. A legacy 64-bit SQLite amount that exceeds this limit is **rejected**, not silently rounded. The destination is created exclusively: **an existing file, including a zero-byte file, is never overwritten**. Restore works **only to a new filename** and does not modify the active database.
20
21 ## Operational handover / rollback
22 1. Capture and verify a protected backup; record its SHA-256 in private release records.