gastownhall/beads · error
failed to check source repository: %w
Error message
failed to check source repository: %w
What it means
This error wraps failures from the source-repository preflight check in validateRepos, which queries the --from repo for at least one issue to confirm the source exists and is readable. It means the validation query itself errored — not that the repo is empty (that produces error 1036 or a warning). The wrapped error holds the storage-level cause.
Source
Thrown at cmd/bd/migrate_issues.go:216
}
fmt.Printf("\n✓ Successfully migrated %d issues from %s to %s\n", len(migrationSet), p.from, p.to)
}
return nil
}
func validateRepos(ctx context.Context, s storage.DoltStorage, from, to string, strict bool) error {
// migrate-issues is a round-trip path — opt out of BEADS_MAX_ROWS
// (designer §4.1) so a misconfigured env doesn't abort migration.
// Check if source repo has any issues
fromIssues, err := s.SearchIssues(ctx, "", types.IssueFilter{
SourceRepo: &from,
Limit: 1,
MaxRows: 0,
MaxRowsSource: "",
})
if err != nil {
return fmt.Errorf("failed to check source repository: %w", err)
}
if len(fromIssues) == 0 {
msg := fmt.Sprintf("source repository '%s' has no issues", from)
if strict {
return fmt.Errorf("%s", msg)
}
if !jsonOutput {
fmt.Fprintf(os.Stderr, "Warning: %s\n", msg)
}
}
// Check if destination repo exists (just a warning)
toIssues, err := s.SearchIssues(ctx, "", types.IssueFilter{
SourceRepo: &to,
Limit: 1,
MaxRows: 0,
MaxRowsSource: "",View on GitHub (pinned to 71377f2769)
Solutions
- Verify the --from repo identifier is correct and exists
- Run `bd doctor` to confirm the local database is readable
- Retry if a concurrent sync or lock was transient
- Check storage backend connectivity if using a remote Dolt server
Defensive patterns
Strategy: validation
Validate before calling
# confirm the source repo resolves and has issues before migrating bd list --repo old-repo --limit 1 && echo OK bd doctor
Prevention
- Verify repo identifiers with bd list before migrating
- Keep the local database synced so source issues exist locally
- Avoid running migrations while a sync holds the database
When it happens
Trigger: validateRepos' source query (SourceRepo=&from, Limit=1) returns a non-nil error during executeMigrateIssues preflight.
Common situations: Typo'd repo path causing a store lookup error; database locked by a concurrent bd sync; storage backend unreachable (remote Dolt server down).
Related errors
- failed to check destination repository: %w
- failed to find candidate issues: %w
- failed to compute migration set: %w
- failed to check dependencies: %w
- strict mode: found %d orphaned dependencies
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/83544d4d671b986d.
Report an issue: GitHub.