- Modified fix.DBJSONLSync() to detect which direction to sync: - If DB > JSONL: run 'bd export' to sync JSONL (DB has newer data) - If JSONL > DB: run 'bd sync --import-only' to import (JSONL is source of truth) - If equal but different timestamps: use file mtime to decide direction - Updated CheckDatabaseJSONLSync() error messages to recommend correct fix direction: - Shows different guidance based on whether DB or JSONL has more issues - Added helper functions: - countDatabaseIssues() to count issues in SQLite - countJSONLIssues() to count issues in JSONL (local, avoids circular import) - Added tests for countJSONLIssues() with edge cases Fixes issue where 'bd doctor --fix' would recommend 'bd sync --import-only' when DB > JSONL, which would be a no-op since JSONL hasn't changed.
18 KiB
18 KiB