NT
  • About
  • Skills
  • Work
  • Experience
  • Achievements
  • Contact
zz
← All work

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

Jump toProblemApproachResultsNext

Problem

Notes drifted, duplicates piled up and task dates went stale across tools.

Approach

  1. 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.
  2. 02A daily maintenance job written as deterministic Python with zero API cost, after an LLM-scan version was rejected on cost.
  3. 03A forced-command SSH key lets that job run exactly one script.
  4. 04An audit pipeline: an inventory script, seven parallel auditors, an independent verifier and mechanical vetoes.
  5. 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

Orphaned notes
4564
0 before after· lower is better
Orphaned notes
Before456
After4
Live duplicate pairs
3655
0 before after· lower is better
Live duplicate pairs
Before365
After5
Overdue tasks reconciled
50 of 53 ReconciledNot reconciled (3)
Overdue tasks reconciled
Reconciled50 of 53
RestNot 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.

← Previous

Claude Code harness

Next →

ARIA recovery monitoring