feat(doctor): add database corruption recovery to --fix
Adds automatic database recovery when bd doctor --fix detects corruption: - Detects SQLite corruption (malformed database, SQLITE_CORRUPT errors) - Backs up corrupted database before recovery attempt - Rebuilds from JSONL if available (issues.jsonl, deletions.jsonl) - Falls back to fresh database if JSONL unavailable - Reports recovery results (issues imported, success/failure) Recovery is triggered automatically by --fix when corruption is detected. No manual intervention required.
This commit is contained in:
@@ -145,6 +145,8 @@ func CheckSyncBranchHookCompatibility(path string) DoctorCheck {
|
||||
Status: StatusWarning,
|
||||
Message: "Pre-push hook is not a bd hook",
|
||||
Detail: "Cannot verify sync-branch compatibility with custom hooks",
|
||||
Fix: "Either run 'bd hooks install --force' to use bd hooks,\n" +
|
||||
" or ensure your custom hook skips validation when pushing to sync-branch",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user