Skip to content

fix(migrate): keep confirmed identity backups confirmed through the owner migration - #643

Closed
GeiserX wants to merge 1 commit into
mainfrom
fix/migration-keeps-backup-confirmations
Closed

GeiserX wants to merge 1 commit into
mainfrom
fix/migration-keeps-backup-confirmations

Conversation

@GeiserX

@GeiserX GeiserX commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Problem

The owner migration in 1.73 empties the "backed up" state on the Payouts page. Every Mysterium identity or ProxyBase wallet you had confirmed as backed up shows "changed" afterwards, even though the migration moved the data byte for byte and checked it twice.

The cause is the backup fingerprint (orchestrator.state_id). It includes the volume's creation time, so that a volume removed and made again counts as new state. The migration removes each earner volume and makes it again with the same name and data. Docker gives the new volume a new creation time, so the fingerprint changes and every confirmation is void.

We saw this on a real three-box upgrade to 1.73.1. Before: Mysterium and ProxyBase confirmed on every box. After: five boxes showed "changed". The only one that stayed confirmed held its identity in a host folder, which the migration does not touch.

Fix

  • owner_migrate.back_up records the old volume's CreatedAt. restore makes the new volume with a cashpilot.state-created label holding that time. If the old volume already had the label, its value is kept.
  • state_id uses that label when a volume has it, and the volume's own CreatedAt otherwise. Removing a volume and making it again by any other route still voids the confirmation, as before.
  • UPGRADING.md: anyone who migrated with 1.73.0 or 1.73.1 needs to confirm those boxes again once. This change cannot repair volumes that were already moved without the label.

Desktop needs nothing: it has no socket proxy and no owner migration, and its backup state is its own.

Tests

  • test_owner_migrate.py::test_a_migrated_volume_keeps_the_backup_fingerprint_it_had: the fingerprint before the migration equals the one after it, even when Docker gives the remade volume a new creation time.
  • test_backup_confirmations.py::TestStateId::test_a_volume_the_owner_migration_made_again_keeps_it.

Both fail on main and pass with this change. The owner-migrate and backup-confirmation test files pass in full (107 tests). ruff check and format are clean.

…wner migration

The backup fingerprint includes a volume's creation time, so a volume made
again reads as new state. The owner migration makes every earner volume
again with the same data, and every confirmed Mysterium or ProxyBase wallet
backup turned to "changed" on the Payouts page. The migration now keeps the
replaced volume's creation time in a label on the new one, and the
fingerprint reads it.
@coderabbitai

coderabbitai Bot commented Nov 7, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 10 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 4f339d9 and a63ef84.

Files selected for processing: 6

  • UPGRADING.md
  • app/constants.py
  • app/orchestrator.py
  • app/owner_migrate.py
  • tests/test_backup_confirmations.py
  • tests/test_owner_migrate.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@codecov

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.96%. Comparing base (4f339d9) to head (a63ef84).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #643      +/-   ##
==========================================
- Coverage   93.97%   93.96%   -0.02%     
==========================================
  Files          74       74              
  Lines       15678    15684       +6     
==========================================
+ Hits        14733    14737       +4     
- Misses        945      947       +2     
Files with missing lines Coverage Δ
app/constants.py 100.00% <100.00%> (ø)
app/orchestrator.py 95.67% <100.00%> (+<0.01%) ⬆️
app/owner_migrate.py 90.58% <100.00%> (+0.07%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@GeiserX

GeiserX commented Nov 7, 2026

Copy link
Copy Markdown
Owner Author

Landed in #653 (f681889), which combined this fix with the others into one release.

@GeiserX GeiserX closed this Nov 7, 2026
@GeiserX
GeiserX deleted the fix/migration-keeps-backup-confirmations branch November 7, 2026 21:42
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