GothenburgBitFactory / GothenburgBitFactory/taskwarrior

Prevent or warn when changing the synchronization method or server

Open
#4,133 1 comment 0 reactions 0 assignees View on GitHub
topic:sync
Dominant language
C++
Stars
6.1k
Forks
423
Avg merge
1d 19h
Merged PRs (30d)
11

Description

Currently, when you change the sync configuration (for instance switching from `local` to `server`), there is no warning, and nothing prevents you from syncing.

But it seem that it will only sync the operations not marked as `synced`, thus making the data in the new sync backend incomplete. A newly synced device using the new backend would miss operations, wouldn’t it.

---

I have four proposals (I didn’t look into the taskwarrior internals, so far)

1. Forbid (or warn) sync when the method or config has changed.
*The implementation could add a `sync_config` key that contains a footprint of the sync method (`server+URL`, `local+DIR`, …), and refuse to sync without force if it has changed.*

2. Add an official (subcommand), or unofficial (script/documentation) method to "unsync" your local replica : it would set `synced` to `0` for all operations and remove information in `sync_meta` . It might be a confusing feature, though.

3. ~~**docs** Remove `Saves disk space.` from the documentation. It seem that all operations are stored in the taskchampion db. Are some operations removed from the local db when syncing ?~~ **edit** still relevant, see comment below

4. **docs** Add a warning in documentation to explain that changing synchronization method or configuration is not supported. It could be an easy step before 1. is implemented.

Contributor guide

Open the contributing guide

Research direction

Start by reading the synchronization configuration and the handling of the `synced` flag and `sync_meta` in the Taskwarrior and TaskChampion integration. Compare the `local` and `server` paths, then determine whether changing the method or configuration should be blocked, warned about, or documented; done means the selected behavior is implemented or the limitation is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, distributed-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.