Repository navigation
fix(sync2): serve only the roster to a removed device on the LAN - #2215
Merged
Merged
Conversation
7 of 15 tasks
Merged
5 of 11 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.
Summary
acceptLinkalso answers a device whose removal this device has applied, when that device was a device in the epoch of its hello. Its link is markedpeerRemoved.connectLinkstill accepts only a current device.LanPeeranswers a removed peer'srosteronly:keyandgetanswernot_found,listanswers emptypathsandblobs,putanswersinvalid, and itslivemessages are dropped.LanSyncserves a removed device without pulling from it, sending it live messages, saving its address or counting it as nearby. The removed device pulls the roster as from any member, and the sync that follows finds it missing and stops.Related issue
Flow-Tube/Flow-Desktop#662
Change type
Validation
./gradlew :app:assembleGithubDebug: not run separately; the debug sources compiled for the unit tests below./gradlew :app:testGithubDebugUnitTest: run for--tests 'io.github.aedev.flow.sync2.*'only: 65 classes, 405 tests, 0 failures./gradlew ktlintCheckpassed;python3 .github/scripts/nightly_notes.py --checkpassedNew tests in
LanSyncTest:a_removed_device_is_answered_with_the_roster_and_nothing_else,a_removed_device_learns_its_removal_from_a_member_it_dials,a_member_refuses_a_device_it_removed_when_it_dials_it.Test device and Android version:
Risk and compatibility
Network: a device this phone removed can still complete the LAN hello under an epoch it was a device in, and read the roster entries (device ids, public keys, sealed names). It gets no wraps, objects or live delivery.
Devices without this change still refuse a removed peer, so a removed device learns of its removal only from an updated member.
No Room schema, preference, permission or background work change.
The change does not introduce secrets, private data, or unexpected telemetry.
New user-facing text uses Android string resources.
Dependency and lockfile changes are intentional and limited to this PR.
Room schema changes include the required version bump and migration, or this PR does not change the Room schema.
Breaking changes and upgrade steps are clearly documented.