Repository navigation
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
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.
Summary
Closes a FLOW-SYNC/2 security gap: until now a recovery key could only be replaced right after a restore, so leaked words could never be revoked. Linked devices now has a "Replace recovery words" row. It asks for confirmation (the old words stop working and the group gets new keys), then appends a
recoveryroster entry as spec/protocol.md "Recovery" allows at any time:K_(e+1)for every device plus the new recovery member, not the old one, along with the history chain box.The new words are shown once with the existing two-word check, and the key counts as unconfirmed until that check is done.
restore()and the newreplaceRecovery()share one builder for therecoveryentry (linking/Recovery.kt), so the post-restore path is unchanged in behaviour. If the store can't be reached or another device's entry lands first, nothing is appended and the error shows.Related issue
None.
Change type
Validation
./gradlew --offline -Dorg.gradle.jvmargs="..." :app:testGithubDebugUnitTest --tests 'io.github.aedev.flow.sync2.*': 229 tests, 1 failure:LanSyncTest.a_listener_takes_its_last_port_only_while_it_is_free(JobCancellationException under full-suite load; this PR doesn't touch LAN). Re-run--tests '...LanSyncTest' --tests '...RecoveryTest'twice: both passed.RecoveryTest:chain; B opens epoch 1RecoveryUsed), and a hand-builtrestoresigned by the old key is refused by the roster rules./gradlew --offline ... ktlintCheck: exit 0.python3 .github/scripts/nightly_notes.py --check: valid../gradlew :app:assembleGithubDebug: not run separately (the test task compiled the github debug sources).Test device and Android version: none yet.
Risk and compatibility
No protocol change: the
recoveryentry and its rules are already in every app that reads the roster. Desktop gets the same action in its own PR. Starting an epoch means every device picks up a new key on its next sync, as after a removal.