{"record":{"id":"7718d1d7f13ef33c","repo":"gastownhall/beads","slug":"no-automatic-fix-available-for-pending-migration","errorCode":null,"errorMessage":"no automatic fix available for pending migration %q","messagePattern":"no automatic fix available for pending migration %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/doctor_fix.go","lineNumber":468,"sourceCode":"\n\t\t\texecPlan := buildHookMigrationExecutionPlan(plan)\n\t\t\tif len(execPlan.BlockingErrors) > 0 {\n\t\t\t\treturn fmt.Errorf(\"hook migration is blocked:\\n- %s\", strings.Join(execPlan.BlockingErrors, \"\\n- \"))\n\t\t\t}\n\n\t\t\tsummary, err := applyHookMigrationExecution(execPlan)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"applying hook migration: %w\", err)\n\t\t\t}\n\n\t\t\tfmt.Printf(\n\t\t\t\t\"  Hook migration applied: %d hook(s) written, %d artifact(s) retired, %d artifact(s) skipped\\n\",\n\t\t\t\tsummary.WrittenHookCount,\n\t\t\t\tsummary.RetiredCount,\n\t\t\t\tsummary.SkippedCount,\n\t\t\t)\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"no automatic fix available for pending migration %q\", migration.Name)\n\t\t}\n\t}\n\n\treturn nil\n}\n","sourceCodeStart":450,"sourceCodeEnd":474,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/doctor_fix.go#L450-L474","documentation":"fixPendingMigrations handles a known set of pending migrations via a switch; only 'hooks' is implemented. Any other migration name falls into the default branch and returns this error, meaning the migration exists in the doctor's data but has no automatic fixer.","triggerScenarios":"`bd fix` encounters a pending migration whose Name is not 'hooks' — a newly introduced migration type before its fixer lands, or a stale/renamed migration recorded in the repository state.","commonSituations":"Running a newer bd that recorded a migration, then downgrading to a bd version lacking the fixer; or future migration types added to doctor detection ahead of fix support.","solutions":["Upgrade bd to the latest version (`bd doctor` shows the version; update if outdated) so a fixer for this migration exists","Check the migration name in the message against `bd doctor` output and follow its manual instructions","If you intentionally downgraded, either re-upgrade or clear the stale pending-migration state per docs","File/consult an issue if the migration name looks like a current, supported one"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"for _, m := range pending {\n  if m.Name != \"hooks\" {\n    fmt.Printf(\"migration %q has no automatic fix; run `bd doctor` for manual steps\\n\", m.Name)\n  }\n}","typeGuard":null,"tryCatchPattern":"if err := fixPendingMigrations(pending, path); err != nil {\n  if strings.Contains(err.Error(), \"no automatic fix available\") {\n    // fall back to manual migration instructions from `bd doctor`\n    return err\n  }\n}","preventionTips":["Keep bd up to date; don't mix versions across the same repo","After any version downgrade, run `bd doctor` to check for orphaned migration state","Read `bd doctor` output for manual steps when auto-fix is unavailable","Report unsupported migration names as issues if seen on the latest version"],"tags":["migration","doctor","unsupported","versioning"],"backgroundTag":"migration-no-auto-fix","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}