Merge pull request #564 from deblasis/fix-daemon-stale-cache

fix(daemon): detect external db file replacement
This commit is contained in:
Steve Yegge
2025-12-16 00:34:57 -08:00
committed by GitHub
5 changed files with 1149 additions and 6 deletions

View File

@@ -371,7 +371,11 @@ func runDaemonLoop(interval time.Duration, autoCommit, autoPush, localMode bool,
return // Use return instead of os.Exit to allow defers to run
}
defer func() { _ = store.Close() }()
log.log("Database opened: %s", daemonDBPath)
// Enable freshness checking to detect external database file modifications
// (e.g., when git merge replaces the database file)
store.EnableFreshnessChecking()
log.log("Database opened: %s (freshness checking enabled)", daemonDBPath)
// Auto-upgrade .beads/.gitignore if outdated
gitignoreCheck := doctor.CheckGitignore()