feat(install): ensure db fingerprint during gt install/rig init (GH #25)

Add repo fingerprint migration after bd init to ensure daemon can start.
Legacy databases (pre-0.17.5) lack fingerprint, causing slow gt status.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
nux
2026-01-02 12:08:58 -08:00
committed by Steve Yegge
parent 50d9643db1
commit 33abd769de
2 changed files with 34 additions and 2 deletions

View File

@@ -435,6 +435,15 @@ func (m *Manager) initBeads(rigPath, prefix string) error {
return writeErr
}
}
// Ensure database has repository fingerprint (GH #25).
// This is idempotent - safe on both new and legacy (pre-0.17.5) databases.
// Without fingerprint, the bd daemon fails to start silently.
migrateCmd := exec.Command("bd", "migrate", "--update-repo-id")
migrateCmd.Dir = rigPath
// Ignore errors - fingerprint is optional for functionality
_, _ = migrateCmd.CombinedOutput()
return nil
}