Skip to content

fix(sync): tell a removed device over the LAN and name installs after the computer - #663

Merged
A-EDev merged 6 commits into
Flow-Tube:mainfrom
Captain-Vikram:fix/issue-662-sync-device-removal-propagation
Nov 19, 2026
Merged

A-EDev merged 6 commits into
Flow-Tube:mainfrom
Captain-Vikram:fix/issue-662-sync-device-removal-propagation

Conversation

@Captain-Vikram

@Captain-Vikram Captain-Vikram commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • A desktop now answers the LAN hello of a device whose removal it has applied, under any epoch that device was a member in, and serves it the roster only. key and get answer not found, list answers an empty listing, put is refused and live messages are dropped. The desktop pulls nothing from it and doesn't keep its address.
  • The dialing side keeps the strict check: a member never opens a session with a device it removed, including after the epoch step-down retry.
  • A LAN meeting that brings new roster entries now starts a sync, so a removed device applies its removal and stops (stop_if_shut_out) without waiting for objects. HeldStore::hold_entry reports whether the entry was new, and Met carries the count.
  • New installs name themselves after the computer on every platform through gethostname (already in the dependency tree), e.g. Flow Desktop (MY-PC - Windows), with Dev added in debug builds.
  • Changelog entries under SYNC in v0.1.0-beta5.txt.

Related issue

Part of #662

Change type

  • Bug fix
  • Feature
  • Refactor or maintenance
  • Documentation
  • Build, packaging, or CI

Validation

Run on macOS (Apple Silicon) on the branch tip with main merged in.

  • pnpm test: 465 files, 2780 tests passed
  • pnpm build: passed
  • cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check: clean
  • cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets --all-features: 0 errors, no warnings in the changed files
  • cargo test --manifest-path src-tauri/Cargo.toml --all-targets --all-features: 1903 passed, 0 failed, 12 ignored
  • I smoke-tested the affected desktop behavior.

New tests: a_removed_device_learns_its_removal_over_lan_and_is_shut_out, a_removed_device_is_served_the_roster_and_nothing_else (fails if the removed peer is served like a member), a_member_opens_no_session_with_a_device_it_removed in tests/sync2_lan.rs, and a_removed_peer_is_answered_with_nothing_but_the_roster in lan_link.rs.

Screenshots or recordings

Risk and compatibility

  • Network: a device this desktop removed can still complete the LAN hello under its old epoch and read the roster entries (device ids, public keys, sealed names). It gets no wraps, objects or live delivery. The spec allows this in docs(spec): let a member serve a removed device its roster over the LAN flow-sync#116.

  • Flow for Android does the same in fix(sync2): serve only the roster to a removed device on the LAN Flow#2215. Until it ships, a phone still refuses a removed peer, so a removed device learns of its removal only from an updated member.

  • The default device name is chosen once, when the sync identity is created, so existing installs keep their name. It now includes the computer's name, which other devices in the group see.

  • No migration or database schema change.

  • No new secrets, private data, telemetry, or broad Tauri permissions were introduced.

  • User-facing documentation was updated where needed.

  • Dependency and lockfile changes are intentional and limited to this PR.

  • Breaking changes and upgrade steps are clearly documented.

@A-EDev A-EDev changed the title fix(sync): propagate device removal across LAN peers and disambiguate device names fix(sync): tell a removed device over the LAN and name installs after the computer Nov 19, 2026
@A-EDev
A-EDev merged commit 2749f48 into Flow-Tube:main Nov 19, 2026
11 checks passed
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