Repository navigation
fix: preserve pending backups across restart #1689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ben-kaufman
wants to merge
40
commits into
fix/restore-identity-background
Choose a base branch
from
fix/backup-observer-lifecycle
base: fix/restore-identity-background
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,839
−658
Open
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
ab59838
fix: stop automatic profile deletion replay
ben-kaufman 99b446a
docs: associate deletion fix with PR 1688
ben-kaufman a8f0810
fix: preserve pending backups across restart
ben-kaufman e585fcc
fix: retain backup changes while restart drains
ben-kaufman c255458
Merge restore recovery parent into backup lifecycle fix
ben-kaufman a102e0e
fix: recognize native backup request transport failures
ben-kaufman 49e9a99
fix: retain explicit backup retry ownership
ben-kaufman 5fe0bf6
fix: integrate current restore recovery parent
ben-kaufman 5fca5cd
fix: integrate current restore recovery parent
ben-kaufman e80ca3f
Merge updated restore identity parent into backup lifecycle
ben-kaufman 9a837a6
fix: keep recovery callbacks ahead of backup debounce
ben-kaufman 2aac53e
Merge current identity recovery into profile session recovery
ben-kaufman 1d3ba14
Merge current identity recovery parent into backup observers
ben-kaufman ff5aa32
Merge restored identity guards into profile deletion recovery
ben-kaufman 9cfe052
Merge restore metadata guards into backup observer lifecycle
ben-kaufman cfe7daf
Merge validated identity restore parent
ben-kaufman 9226253
Merge restored-identity allowance admission
ben-kaufman a3693b0
Merge stable allowance activation into backup observation
ben-kaufman 2eb0c49
Merge guarded identity and allowance recovery parent
ben-kaufman f068aba
Merge current allowance resume fix into recovery branch
ben-kaufman 439b5d0
merge: include identity recovery diagnostics
ben-kaufman add2c04
merge: integrate current identity recovery
ben-kaufman 8727da0
fix: initialize cold explicit backup retries
ben-kaufman e7fb0ac
fix: retry backup authentication transport failures
ben-kaufman 1a6048a
fix: retain backup ownership across wallet transitions
ben-kaufman 2fa4098
merge: compose queued backup status
ben-kaufman 1cf5d39
merge: compose admitted backup status
ben-kaufman a60add9
Merge the current restore identity branch into backup observation
ben-kaufman be4e1ba
fix: retry wallet and USDT recovery uploads after VSS setup times out
ben-kaufman f8b2ffc
Preserve full activity uploads across backup observation
ben-kaufman 534b3d8
Preserve Spark backups in admitted observation lifecycle
ben-kaufman 9f60111
fix: compose spark restore backup recovery
ben-kaufman e0d2598
fix: preserve explicit profile deletion recovery
ben-kaufman c53a459
fix: preserve profile ownership during recovery
ben-kaufman 62c8cf2
fix: retain recovery guards in the composed parent
ben-kaufman 66ba140
fix: retain recovery with spark balance updates
ben-kaufman 4024e8b
fix: preserve recovery with startup cache loading
ben-kaufman ac1549f
fix: preserve recovery with node timeout balance updates
ben-kaufman afb4f06
fix: preserve recovery across parent changes
ben-kaufman 43e314c
fix: preserve recovery with finished-exit balance updates
ben-kaufman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
1,064 changes: 652 additions & 412 deletions
1,064
app/src/main/java/to/bitkit/repositories/BackupRepo.kt
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[MEDIUM] Retry cannot refresh a failed pubky profile delete
Delete a non-Ring profile while that sign-in is still current and
pubkyService.deletePubkyProfilefails withPaykitException.Identity.deletePubkyAppProfilepreviously ran that delete insidewithPubkyAppScope, which signs in from the local secret and retries the delete once for an identity error. The wrapper is gone, and the concurrent-update retry is also direct.refreshSessionIfPossibleis now private and only used bywithPubkyAppScopefor other profile writes.retryDeleteProfilecallsattemptDeleteProfile, which callsdeleteProfile()again and never refreshes the session.Retry therefore returns the same identity error. The dialog's other action signs out and leaves the homeserver profile in place.
While the original sign-in is still current, refresh once and retry only the failed pubky profile delete. Do not sign in after sign-out, and do not start a second contact cleanup or profile deletion after an uncertain acknowledgement. Keep
profile deletion does not replay after an uncertain response;pubky app deletion does not renew the session or replay an identity errorcurrently forbids this still-signed-in refresh.Evidence basis: source analysis at
62c8cf23. This review did not execute the deletion.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed from the public source: explicit Retry calls the whole
deleteProfile()operation again and has no failed-step session recovery. The existing no-replay tests cover automatic replay; they do not establish successful explicit recovery after a confirmed authentication rejection.I am leaving this concern open.
PaykitException.Identityalone does not establish that this exact request was rejected before dispatch, and the currentsignInboundary does not demonstrate preservation of the original grant and homeserver. Restoring either broad wrapper would also reintroduce the sign-out/replacement and uncertain-acknowledgement risks you identified.A safe fix needs the exact refusal contract and a one-use continuation for only the refused step, retaining the original sign-in generation, revision and acknowledgements. It must refuse sign-out/replacement and must not repeat acknowledged contact/profile cleanup. The current cache-startup composition leaves all of these deletion sources and tests unchanged; it does not claim this recovery limitation is fixed. This disposition is source-based, with no new installed deletion execution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked at ac1549f: the deletion sources and tests are unchanged. Explicit Retry still calls the whole deletion without failed-step session recovery. This composition does not claim to fix the limitation described in your reply.