Skip to content

fix(backup): retain money policy during isolated recovery - #97

Merged
LIghtJUNction merged 1 commit into
mainfrom
fix/issue-84-restore-money-policy
Sep 27, 2026
Merged

LIghtJUNction merged 1 commit into
mainfrom
fix/issue-84-restore-money-policy

Conversation

@LIghtJUNction

Copy link
Copy Markdown
Member

Refs #84. This fixes a reproduced recovery-policy loss, not the complete legacy migration/deployment acceptance umbrella.

Reproduction and fix

_write_restored_config retained 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.py passed 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.

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.
Copilot AI lite review requested due to automatic review settings September 27, 2026 20:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-09-27T20:25:29.609797Z 2676cbc PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@LIghtJUNction
LIghtJUNction merged commit 94c58e7 into main Sep 27, 2026
1 of 2 checks passed
@github-actions
github-actions Bot deleted the fix/issue-84-restore-money-policy branch September 28, 2026 10:15
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.

2 participants