fix(dolt): add hook compatibility check and migration warning

Two improvements for Dolt backend users with stale git hooks:

1. Migration warning: When running 'bd migrate --to-dolt', warn if
   installed hooks lack the Dolt backend check and suggest reinstalling.

2. Doctor check: New CheckGitHooksDoltCompatibility() detects when
   hooks exist but lack the Dolt skip logic, surfacing the error with
   a clear fix message.

Both changes help users who migrated to Dolt but have pre-migration
hooks that try to run JSONL sync (which fails with Dolt backend).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
gastown/crew/joe
2026-01-25 11:54:30 -08:00
parent c78889fa65
commit a93c32b425
3 changed files with 110 additions and 0 deletions

View File

@@ -281,6 +281,13 @@ func runDiagnostics(path string) doctorResult {
result.OverallOK = false
}
// Check git hooks Dolt compatibility (hooks without Dolt check cause errors)
doltHooksCheck := convertWithCategory(doctor.CheckGitHooksDoltCompatibility(path), doctor.CategoryGit)
result.Checks = append(result.Checks, doltHooksCheck)
if doltHooksCheck.Status == statusError {
result.OverallOK = false
}
// If no .beads/, skip remaining checks
if installCheck.Status != statusOK {
return result