feat(daemon): add sync backoff and consolidate hints into tips

Daemon sync improvements:
- Adds exponential backoff on sync failures (30s → 1m → 2m → 5m → 10m → 30m cap)
- Tracks sync state in .beads/sync-state.json (NeedsManualSync, FailureCount, BackoffUntil)
- Resets backoff on daemon start and manual bd sync
- Adds sync-state.json to default .gitignore

Tips consolidation (following ox-cli pattern):
- Moves sync conflict hint from hints.go into tips.go
- Proactive health checks trump educational tips
- Uses InjectTip() with high priority (200) and 100% probability for urgent warnings
- Removes deprecated hints.go
This commit is contained in:
Ryan Snodgrass
2025-12-26 19:09:31 -05:00
parent 721ae70ccb
commit 252de1cdba
8 changed files with 240 additions and 2 deletions

View File

@@ -361,6 +361,9 @@ Use --merge to merge the sync branch back to main branch.`,
}
}
// Clear sync state on successful sync (daemon backoff/hints)
_ = ClearSyncState(beadsDir)
fmt.Println("\n✓ Sync complete")
return
}
@@ -711,6 +714,11 @@ Use --merge to merge the sync branch back to main branch.`,
skipFinalFlush = true
}
// Clear sync state on successful sync (daemon backoff/hints)
if bd := beads.FindBeadsDir(); bd != "" {
_ = ClearSyncState(bd)
}
fmt.Println("\n✓ Sync complete")
}
},