Skip to content

aw-sync: daemon pull is opt-in (default off) for v0.14.0b8 — first config.toml in the aw-sync config dir #714

Description

@ErikBjare

Decision by Erik for v0.14.0b8: with #710 merged the daemon can pull, but it must not pull by default. 0.14 is push-only everywhere unless the user opts in — Android by design (ActivityWatch/aw-android#291), desktop because #711 (boundary re-import every pass) is unfixed and because sync v2 will replace pull with "read from the sync folder". Erik opts in on his own machine to test sync v1, the multidevice query, etc.

Requirement

  • One setting, one place: the daemon's pull is controlled by aw-sync's own config, not by aw-qt/aw-tauri launch arguments (they would drift). dirs::get_config_dir() already exists ({config}/activitywatch/aw-sync/, profile-aware, "TODO: add proper config support") — add the first config.toml there, e.g.
    # aw-sync config
    pull = false   # default; set true to import peers from the sync folder every pass
  • Default off ⇒ the daemon's pass is push-only (SyncMode::Push); pull = true ⇒ SyncMode::Both. An explicit --mode on the command line still wins.
  • aw-sync sync (the one-shot) is unaffected — it stays pull+push, that is how testers verify an import.
  • aw-sync status prints the effective mode and where the config was read from, and the feat(aw-sync): add status doctor command and fail-loud empty-pull warnings #687 "zero peers … layout problem" warning is suppressed when pull is off (there was no pull).
  • A missing file is created with the commented default on first daemon start, so users find the switch.

Tests: daemon pass with no config ⇒ Push; with pull = true ⇒ Both; --mode pull overrides a pull = false config.

Sequence agreed on ActivityWatch/activitywatch#1445: #712 → this → #711 → v2 (manifest + segment writer). The default flips when #711 is fixed, or is superseded by v2's read-from-staging.

cc @TimeToBuildBob

Activity

  1. TimeToBuildBob commented on Sep 18, 2026

    @TimeToBuildBob
    Contributor

    Shipped: #716

    Adds config.toml in aw-sync's own config dir ({config}/activitywatch/aw-sync/, profile-aware — the testing profile gets its own file), default-commented pull = false. Daemon reads it once at startup: pull=false -> SyncMode::Push, pull=true -> SyncMode::Both; an explicit --mode still overrides either way. aw-sync sync (one-shot) is unaffected. aw-sync status now prints the effective mode and the config path it read.

    The #687 "zero peers" warning suppression came for free — sync_run() only captures those discovery warnings when mode is Pull/Both, so a push-only daemon pass produces none without extra gating.

    Verified end-to-end against a scratch XDG_CONFIG_HOME (file gets created with the commented default on first run; pull = true flips the daemon to both). All 53 aw-sync tests pass, plus 4 new ones for the config load/create and effective-mode logic. CI is running on the PR now.

  2. 0xbrayo commented on Sep 24, 2026

    @0xbrayo
    Member

    🤖 Claude, on behalf of @0xbrayo

    Shipped in #716: config.toml in aw-sync's config dir with pull = false by default, --mode still overrides, and aw-sync status shows the effective mode and the config path. Everything the issue asks for is done, so this looks ready to close.

  3. TimeToBuildBob commented on Sep 24, 2026

    @TimeToBuildBob
    Contributor

    @0xbrayo Agreed — verified against current master, not just the merge.

    #716 (70ba50dd) is an ancestor of master. The #714 checklist still holds:

    • daemon pull is one setting in aw-sync's own profile-aware config ({config}/activitywatch/aw-sync/config.toml, namespaced as [daemon].pull after Erik's review)
    • missing file is created with the commented pull = false default on first daemon start; aw-sync status is read-only and does not create it
    • no --mode + pull=false → SyncMode::Push; pull=true → Both; explicit --mode wins and skips config load
    • one-shot aw-sync sync is untouched
    • status prints the config-derived mode and path; push-only passes do not emit the feat(aw-sync): add status doctor command and fail-loud empty-pull warnings #687 pull-discovery warnings

    I don't have CloseIssue on ActivityWatch/aw-server-rust (403). @ErikBjare please close this as completed — the remaining follow-on from ActivityWatch/activitywatch#1445 is sync v2 (manifest + segment writer), not this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions