chore(gastown): scorched-earth SQLite removal from codebase
Remove all bd sync references and SQLite-specific code from gastown: **Formulas (agent priming):** - mol-polecat-work: Remove bd sync step from prepare-for-review - mol-sync-workspace: Replace sync-beads step with verify-beads (Dolt check) - mol-polecat-conflict-resolve: Remove bd sync from close-beads - mol-polecat-code-review: Remove bd sync from summarize-review and complete-and-exit - mol-polecat-review-pr: Remove bd sync from complete-and-exit - mol-convoy-cleanup: Remove bd sync from archive-convoy - mol-digest-generate: Remove bd sync from send-digest - mol-town-shutdown: Replace sync-state step with verify-state - beads-release: Replace restart-daemons with verify-install (no daemons with Dolt) **Templates (role priming):** - mayor.md.tmpl: Update session end checklist to remove bd sync steps - crew.md.tmpl: Remove bd sync references from workflow and checklist - polecat.md.tmpl: Update self-cleaning model and session close docs - spawn.md.tmpl: Remove bd sync from completion steps - nudge.md.tmpl: Remove bd sync from completion steps **Go code:** - session_manager.go: Remove syncBeads function and call - rig_dock.go: Remove bd sync calls from dock/undock - crew/manager.go: Remove runBdSync, update Pristine function - crew_maintenance.go: Remove bd sync status output - crew.go: Update pristine command help text - polecat.go: Make sync command a no-op with deprecation message - daemon/lifecycle.go: Remove bd sync from startup sequence - doctor/beads_check.go: Update fix hints and Fix to use bd import not bd sync - doctor/rig_check.go: Remove sync status check, simplify BeadsConfigValidCheck - beads/beads.go: Update primeContent to remove bd sync references With Dolt backend, beads changes are persisted immediately to the sql-server. There is no separate sync step needed. Part of epic: hq-e4eefc (SQLite removal) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -110,11 +110,11 @@ Examples:
|
||||
|
||||
var polecatSyncCmd = &cobra.Command{
|
||||
Use: "sync <rig>/<polecat>",
|
||||
Short: "Sync beads for a polecat",
|
||||
Short: "Sync beads for a polecat (deprecated with Dolt backend)",
|
||||
Long: `Sync beads for a polecat's worktree.
|
||||
|
||||
Runs 'bd sync' in the polecat's worktree to push local beads changes
|
||||
to the shared sync branch and pull remote changes.
|
||||
NOTE: With Dolt backend, beads changes are persisted immediately.
|
||||
This command is a no-op when using Dolt.
|
||||
|
||||
Use --all to sync all polecats in a rig.
|
||||
Use --from-main to only pull (no push).
|
||||
@@ -534,87 +534,9 @@ func runPolecatRemove(cmd *cobra.Command, args []string) error {
|
||||
}
|
||||
|
||||
func runPolecatSync(cmd *cobra.Command, args []string) error {
|
||||
if len(args) < 1 {
|
||||
return fmt.Errorf("rig or rig/polecat address required")
|
||||
}
|
||||
|
||||
// Parse address - could be "rig" or "rig/polecat"
|
||||
rigName, polecatName, err := parseAddress(args[0])
|
||||
if err != nil {
|
||||
// Might just be a rig name
|
||||
rigName = args[0]
|
||||
polecatName = ""
|
||||
}
|
||||
|
||||
mgr, _, err := getPolecatManager(rigName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Get list of polecats to sync
|
||||
var polecatsToSync []string
|
||||
if polecatSyncAll || polecatName == "" {
|
||||
polecats, err := mgr.List()
|
||||
if err != nil {
|
||||
return fmt.Errorf("listing polecats: %w", err)
|
||||
}
|
||||
for _, p := range polecats {
|
||||
polecatsToSync = append(polecatsToSync, p.Name)
|
||||
}
|
||||
} else {
|
||||
polecatsToSync = []string{polecatName}
|
||||
}
|
||||
|
||||
if len(polecatsToSync) == 0 {
|
||||
fmt.Println("No polecats to sync.")
|
||||
return nil
|
||||
}
|
||||
|
||||
// Sync each polecat
|
||||
var syncErrors []string
|
||||
for _, name := range polecatsToSync {
|
||||
// Get polecat to get correct clone path (handles old vs new structure)
|
||||
p, err := mgr.Get(name)
|
||||
if err != nil {
|
||||
syncErrors = append(syncErrors, fmt.Sprintf("%s: %v", name, err))
|
||||
continue
|
||||
}
|
||||
|
||||
// Check directory exists
|
||||
if _, err := os.Stat(p.ClonePath); os.IsNotExist(err) {
|
||||
syncErrors = append(syncErrors, fmt.Sprintf("%s: directory not found", name))
|
||||
continue
|
||||
}
|
||||
|
||||
// Build sync command
|
||||
syncArgs := []string{"sync"}
|
||||
if polecatSyncFromMain {
|
||||
syncArgs = append(syncArgs, "--from-main")
|
||||
}
|
||||
|
||||
fmt.Printf("Syncing %s/%s...\n", rigName, name)
|
||||
|
||||
syncCmd := exec.Command("bd", syncArgs...)
|
||||
syncCmd.Dir = p.ClonePath
|
||||
output, err := syncCmd.CombinedOutput()
|
||||
if err != nil {
|
||||
syncErrors = append(syncErrors, fmt.Sprintf("%s: %v", name, err))
|
||||
if len(output) > 0 {
|
||||
fmt.Printf(" %s\n", style.Dim.Render(string(output)))
|
||||
}
|
||||
} else {
|
||||
fmt.Printf(" %s\n", style.Success.Render("✓ synced"))
|
||||
}
|
||||
}
|
||||
|
||||
if len(syncErrors) > 0 {
|
||||
fmt.Printf("\n%s Some syncs failed:\n", style.Warning.Render("Warning:"))
|
||||
for _, e := range syncErrors {
|
||||
fmt.Printf(" - %s\n", e)
|
||||
}
|
||||
return fmt.Errorf("%d sync(s) failed", len(syncErrors))
|
||||
}
|
||||
|
||||
// With Dolt backend, beads changes are persisted immediately - no sync needed
|
||||
fmt.Println("Note: With Dolt backend, beads changes are persisted immediately.")
|
||||
fmt.Println("No sync step is required.")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user