gastownhall/beads · error
%s
Error message
%s
What it means
In strict mode this is an intentional abort: the source repository passed to `bd migrate-issues` contains no issues, so there is nothing to migrate and --strict refuses to continue. Without --strict the same condition is only a warning on stderr and the command proceeds (producing the earlier 'No issues match the specified filters' output).
Source
Thrown at cmd/bd/migrate_issues.go:222
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: "",
})
if err != nil {
return fmt.Errorf("failed to check destination repository: %w", err)
}
if len(toIssues) == 0 && !jsonOutput {View on GitHub (pinned to 71377f2769)
Solutions
- Verify the --from repo name is spelled correctly
- Run `bd list --repo <from>` to confirm issues exist locally and run `bd sync` if not
- Drop --strict if an empty source is an expected no-op
- Check whether a previous migration already consumed these issues
Example fix
// before: fails strict preflight cmd bd migrate-issues --from wrong-repo-name --to new-repo --strict // after: verify the source has issues first bd list --from old-repo --limit 1 cmd bd migrate-issues --from old-repo --to new-repo --strict
Defensive patterns
Strategy: validation
Validate before calling
# guard: only pass --strict when the source is known non-empty count=$(bd list --repo old-repo --json | jq 'length') if [ "$count" -gt 0 ]; then bd migrate-issues --from old-repo --to new-repo --strict fi
Type guard
function sourceHasIssues(listOutput) {
return Array.isArray(listOutput) && listOutput.length > 0;
} Prevention
- Check bd list output for the source repo before a strict migration
- Confirm the exact repo spelling
- Remember prior migrations may have already emptied the source
- Sync first so local state reflects remote
When it happens
Trigger: len(fromIssues) == 0 && strict in validateRepos — the Limit=1 probe query against the --from repo returned zero rows.
Common situations: Typo in the --from repo name; all issues already migrated in a previous run; filters exclude everything; pointing at a freshly cloned repo whose issues were never synced locally.
Related errors
- strict mode: found %d orphaned dependencies
- 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/18133aafce5a3b7d.
Report an issue: GitHub.