Repository navigation
fix(backup): retain money policy during isolated recovery - #97
Merged
Merged
Conversation
Refs #84. Restore the money section alongside identity/plugin/limit policy while retaining loopback binding, new storage, disabled outgoing effects and write freeze. Add a real PostgreSQL backup/restore regression.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Sep 27, 2026
Closed
4 of 10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #84. This fixes a reproduced recovery-policy loss, not the complete legacy migration/deployment acceptance umbrella.
Reproduction and fix
_write_restored_configretained identity/limits/plugins/tools but omitted[money]. A successful backup and restore silently reset a custom display name and currency code to MSG. Include the money section in the existing policy allowlist. This does not copy production DSNs, mail configuration or cache connections.Evidence
The new real PostgreSQL backup/restore test failed before the change on the restored MoneyConfig comparison. After the one-line fix,
python -m pytest -q tests/test_backup_policy.py tests/test_backup_drill.py tests/test_backup_daemon.pypassed 6 tests locally (Python 3.13.5, PostgreSQL 16.15, actual pg_dump/pg_restore and Git/CAS files).The added test verifies the custom money labels, fixed primary currency/scale/no-overdraft policy, identity recovery window, identical public money state and authenticated balance, new target DSN, loopback binding, no mail/Valkey, config mode 0600, and disabled writes/cleanup after loading the restored Application. Existing corruption-before-restore and isolated recovery effect tests are retained.
Boundaries
No schema, ledger, CA or authorization changes. No production deployment or restore into existing locations. Recovery remains fail-closed and external effects disabled. Full Python 3.15 CI is required independently; legacy conservation, crash/rollback and live installation acceptance remain open in #84.