spacedrive/.tasks/LSYNC-003-library-sync-setup.md

1.4 KiB

id, title, status, assignee, parent, priority, tags
id title status assignee parent priority tags
LSYNC-003 Library Sync Setup (Device Registration & Discovery) Done james LSYNC-000 High
sync
networking
library-setup
device-pairing

Description

Implement the library sync setup flow that enables paired devices to discover each other's libraries and register for synchronization.

Update (Oct 2025): No longer assigns leader roles (leaderless architecture).

Implementation Notes

  • Complete implementation detailed in docs/core/sync-setup.md
  • Devices must be paired (NET-002) before library sync setup
  • Two-phase process: Discovery → Registration
  • Bidirectional device registration in each library's database
  • Leader election during setup (No longer needed)
  • No actual sync replication in Phase 1 (just registration)

Changes for Leaderless Model

Removed:

  • Leader election during setup
  • Setting sync_leadership field

Acceptance Criteria

  • Paired devices can discover each other's libraries
  • Devices can be registered in remote library databases
  • Sync leadership assigned during setup (No longer applicable)
  • sync_partners records created
  • sync_setup.discover query implemented
  • sync_setup.input action implemented
  • Integration tests validate cross-device setup

References

  • docs/core/sync-setup.md - Setup flow
  • core/src/infra/sync/NEW_SYNC.md - Leaderless model