gastownhall/beads · error
strict mode: found %d orphaned dependencies
Error message
strict mode: found %d orphaned dependencies
What it means
This is an intentional strict-mode abort: `bd migrate-issues --strict` refuses to proceed when the migration set contains orphaned dependencies — dependencies whose target issues are outside the migration set. Migrating would leave dangling references in the destination, so the command stops before building the plan. The count in the message tells you how many orphaned edges were found.
Source
Thrown at cmd/bd/migrate_issues.go:168
}
fmt.Println("Nothing to do: no issues match the specified filters")
return nil
}
// Step 3: Expand set to M (migration set) based on --include
migrationSet, dependencyStats, err := expandMigrationSet(ctx, s, candidates, p)
if err != nil {
return fmt.Errorf("failed to compute migration set: %w", err)
}
// Step 4: Check for orphaned dependencies
orphans, err := checkOrphanedDependencies(ctx, s)
if err != nil {
return fmt.Errorf("failed to check dependencies: %w", err)
}
if len(orphans) > 0 && p.strict {
return fmt.Errorf("strict mode: found %d orphaned dependencies", len(orphans))
}
// Step 5: Build migration plan
plan := buildMigrationPlan(candidates, migrationSet, dependencyStats, orphans, p.from, p.to)
// Step 6: Display plan
if err := displayMigrationPlan(plan, p.dryRun); err != nil {
return err
}
// Step 7: Execute migration if not dry-run
if !p.dryRun {
if !p.yes && !jsonOutput {
if !confirmMigration(plan) {
fmt.Println("Migration canceled")
return nil
}
}View on GitHub (pinned to 71377f2769)
Solutions
- Re-run with --include dependencies (or a wider filter) so linked issues join the migration set
- Drop --strict to get a warning instead of an abort, then review the reported orphans
- Manually resolve or delete the orphaned dependency records before migrating
- Use the JSON output to enumerate orphans and fix them in bulk
Example fix
// before: aborts cmd bd migrate-issues --from old-repo --to new-repo --strict // after: include linked deps so no orphans remain cmd bd migrate-issues --from old-repo --to new-repo --strict --include dependencies
Defensive patterns
Strategy: validation
Validate before calling
// pre-check: plan first and inspect the orphan count in JSON output bd migrate-issues --from old --to new --include dependencies --dry-run --json | jq '.orphans' # only run with --strict when the orphan list is empty
Type guard
function hasNoOrphans(planResult) {
return Array.isArray(planResult.orphans) && planResult.orphans.length === 0;
} Prevention
- Always pass --include dependencies when issues reference each other
- Dry-run with --json and inspect orphans before using --strict
- Resolve or delete dangling dependencies before migrating
- Migrate whole connected components rather than arbitrary subsets
When it happens
Trigger: len(orphans) > 0 && p.strict in executeMigrateIssues — orphaned dependencies exist and --strict was passed.
Common situations: Migrating a filtered subset of issues whose cross-references span repos or labels not included by --include; migrating between repos where the dependency partner lives in the source repo; partial earlier migrations left half-moved dependency graphs.
Related errors
- %s
- failed to find candidate issues: %w
- failed to compute migration set: %w
- failed to check dependencies: %w
- migration failed: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/96fafbb1dc6820de.
Report an issue: GitHub.