You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
aw-sync: the daemon (what aw-qt/aw-tauri spawn) still pulls with the 2-level walker — Android's 3-level staging is never imported, v0.14.0b7 included #709
Reproduced today on erb-m2 against a desktop instance, with aw-sync built from master (b0fab73, the revision v0.14.0b7 pins).
What happens
aw-sync status classifies the phone correctly: [peer 3-level] poco_f8_ultra/41662faa-…/test.db 299.2 MB buckets: 6 events: 1436166 imported locally: no.
aw-sync sync (plain, no --mode) imports it — that path is sync_wrapper::pull_all → list_remote_dbs (3-level).
aw-sync with no subcommand — the default, and exactly what aw-qt spawns (ps on the running daemon: /Applications/ActivityWatch.app/Contents/Resources/aw-sync, no args) — runs daemon() → sync::sync_run → find_remotes_nonlocal_selection → find_remotes, which is the 2-level walker ({sync_dir}/{x}/*.db). Result: Found 0 remote db files to pull, followed by the feat(aw-sync): add status doctor command and fail-loud empty-pull warnings #687 "zero peers … is usually a layout problem" warning, followed by a listing that includes the phone as a 3-level peer it did not select. Same for sync --mode pull.
So the daemon pushes every 5 minutes and never pulls an Android peer, on master. The doc comment on find_remotes says "Default-daemon pull is list_remote_dbs (3-level-only), not this function" — that is not what fn daemon does (main.rs, the sync_run call in its loop). I believe this is the original ActivityWatch/activitywatch#1445 symptom surviving every sync PR since, because each fix was verified through pull_all/status rather than through the daemon.
Invariant to enforce
Whatever status reports as a selectable peer, the daemon imports. Concretely sync_run (or daemon()) must select peers with the same list_remote_dbs + select_remote_dbs_detailed the doctor and pull_all use, keeping the legacy 2-level results as a union for old desktop peers (own-device exclusion and the #683 largest-wins dedupe already apply to both). A test that runs daemon's pass function once against a 3-level fixture and asserts the import is the regression guard — the existing tests cover pull_all, which is not the code path users run.
Side findings from the same session (separate, minor)
aw-sync status (read-only doctor) takes the aw-sync-at-<host>-on-<port> single-instance lock, so it cannot run while the daemon is running — the one time you need it. Doctor commands should not take the daemon's lock.
~/Library/Caches/activitywatch/client_locks/ holds 9,012 lock files here; they are never removed.
cc @TimeToBuildBob — this is release-blocking for the "Android sync works in 0.14" story; the fix is small once the selection is shared.
Reproduced today on erb-m2 against a desktop instance, with
aw-syncbuilt from master (b0fab73, the revision v0.14.0b7 pins).What happens
aw-sync statusclassifies the phone correctly:[peer 3-level] poco_f8_ultra/41662faa-…/test.db 299.2 MB buckets: 6 events: 1436166 imported locally: no.aw-sync sync(plain, no--mode) imports it — that path issync_wrapper::pull_all→list_remote_dbs(3-level).aw-syncwith no subcommand — the default, and exactly what aw-qt spawns (pson the running daemon:/Applications/ActivityWatch.app/Contents/Resources/aw-sync, no args) — runsdaemon()→sync::sync_run→find_remotes_nonlocal_selection→find_remotes, which is the 2-level walker ({sync_dir}/{x}/*.db). Result:Found 0 remote db files to pull, followed by the feat(aw-sync): addstatusdoctor command and fail-loud empty-pull warnings #687 "zero peers … is usually a layout problem" warning, followed by a listing that includes the phone as a 3-level peer it did not select. Same forsync --mode pull.So the daemon pushes every 5 minutes and never pulls an Android peer, on master. The doc comment on
find_remotessays "Default-daemon pull islist_remote_dbs(3-level-only), not this function" — that is not whatfn daemondoes (main.rs, thesync_runcall in its loop). I believe this is the original ActivityWatch/activitywatch#1445 symptom surviving every sync PR since, because each fix was verified throughpull_all/statusrather than through the daemon.Invariant to enforce
Whatever
statusreports as a selectable peer, the daemon imports. Concretelysync_run(ordaemon()) must select peers with the samelist_remote_dbs+select_remote_dbs_detailedthe doctor andpull_alluse, keeping the legacy 2-level results as a union for old desktop peers (own-device exclusion and the #683 largest-wins dedupe already apply to both). A test that runsdaemon's pass function once against a 3-level fixture and asserts the import is the regression guard — the existing tests coverpull_all, which is not the code path users run.Side findings from the same session (separate, minor)
aw-sync status(read-only doctor) takes theaw-sync-at-<host>-on-<port>single-instance lock, so it cannot run while the daemon is running — the one time you need it. Doctor commands should not take the daemon's lock.~/Library/Caches/activitywatch/client_locks/holds 9,012 lock files here; they are never removed.cc @TimeToBuildBob — this is release-blocking for the "Android sync works in 0.14" story; the fix is small once the selection is shared.