A two-way sync engine that refuses to guess: fail-closed design for Google Tasks ↔ Microsoft To Do
tasks-todo-sync is a self-hosted, two-way sync between Google Tasks and Microsoft To Do, running in your own Google Apps Script project. v1.0.0, 549 tests passing, Windows one-click installer. No third-party server ever sees your task list — because there isn't one.
Two-way sync is a harder problem than it looks. Either side can change, edits can arrive out of order, and one API can be down while the other keeps accepting writes. The engine is built around one rule: when in doubt, stop — never guess.
Fail-closed writes
If a create's outcome is uncertain, the engine records it and halts instead of retrying blindly. A missed task is recoverable; a duplicated one corrupts everything downstream. Correlation markers track ambiguous creates so nothing is written twice.
Two-round deletion
Nothing is removed on a single observation. The first round records the disappearance; the second round revalidates against the live API before anything is retired. Deletion evidence is journaled, so an interrupted round resumes cleanly instead of leaving orphans.
Checksummed state with restore
Sync state carries checksums with previous-generation restore. A broken round can't poison the next one — the engine falls back to the last known-good state.
Time Bridge
Google Tasks stores dates only, no time-of-day. The engine treats [TTS-TIME:HH:mm] markers in notes as the canonical time record: it sets the Microsoft due time and reminder, then splices the marker out. Optional Calendar projection renders timed tasks as 30-minute events on a dedicated secondary calendar.
Recurrence stays with its owner
Microsoft's recurrence engine owns recurrence. The sync's write path never touches it — a recurrence bug in an earlier version duplicated tasks across rounds, and the fix was to make recurrence entirely off-limits to writes.
Built for the Apps Script budget
The whole engine runs on a 10-minute trigger inside ~6 minutes of Apps Script execution budget. Everything is checkpointed and resumable, so a round that runs out of time picks up where it left off.
Verified, not just written
v1.0.0 went through a five-axis adversarial review: state machines, fuzzing, concurrency, mutation testing, static consistency. Every finding had to reproduce against shipped code; every fix ships with a regression test.
Top comments (0)