Case study · 08
Self-healing knowledge system
A synced, end-to-end encrypted notes vault with deterministic maintenance and two-way task sync.
- Role
- Personal project
- Status
- Running
- Read
- 1 min
- Stack
- n8nCouchDBPythonObsidian REST APITodoist API
456 → 4
orphaned notes after a vault-wide audit
Problem
Notes drifted, duplicates piled up and task dates went stale across tools.
Approach
- 01A 26-node two-way task sync with four branches: append new tasks, tick completed ones, close tasks from note ticks, and a reconcile pass for deleted or rescheduled tasks. An idempotency marker per synced line prevents duplicates, and the sync does nothing if the API returns a partial or empty list.
- 02A daily maintenance job written as deterministic Python with zero API cost, after an LLM-scan version was rejected on cost.
- 03A forced-command SSH key lets that job run exactly one script.
- 04An audit pipeline: an inventory script, seven parallel auditors, an independent verifier and mechanical vetoes.
- 05Found by direct testing: percent-encoding is required for emoji headings, whole-path encoding turns slashes into 404s, and create-if-missing is unsafe.
Maintenance written as deterministic code, with zero API cost.
Results
| Before | 456 |
|---|---|
| After | 4 |
| Before | 365 |
|---|---|
| After | 5 |
| Reconciled | 50 of 53 |
|---|---|
| Rest | Not reconciled (3) |
- Orphaned notes 456 → 4. Live duplicate pairs 365 → 5.
- 50 of 53 overdue tasks reconciled, after 27 turned out to be gone and 14 had stale dates.
- Two mirrors verified identical across 9,679 files.
- An unresolved sync conflict once made a mirror edit a stale copy. It is now detected, resolved and alerted on.
What I'd do next
- Alert on sync conflicts before they reach automations.