gastownhall/beads · error
GetIssueDependencyRecords: %w
Error message
GetIssueDependencyRecords: %w
What it means
GetIssueDependencyRecords fetches dependency records for a batch of regular issue IDs via depRepo.GetDependencyRecordsForIssues. This error wraps any repository failure of that lookup. Empty input short-circuits to an empty map without touching storage, so the error only occurs on non-empty queries that fail at the storage layer.
Source
Thrown at internal/storage/domain/dependency.go:810
// CycleThroughEdges passes the pairs straight to the repository walk
// AddDependencies runs as its own final gate. The caller composes the refusal,
// because the two callers word it differently and both spellings are already
// pinned.
func (u *dependencyUseCaseImpl) CycleThroughEdges(ctx context.Context, edges [][2]string) (string, error) {
if len(edges) == 0 {
return "", nil
}
return u.depRepo.CycleThroughEdges(ctx, edges)
}
func (u *dependencyUseCaseImpl) GetIssueDependencyRecords(ctx context.Context, issueIDs []string) (map[string][]*types.Dependency, error) {
if len(issueIDs) == 0 {
return map[string][]*types.Dependency{}, nil
}
out, err := u.depRepo.GetDependencyRecordsForIssues(ctx, issueIDs)
if err != nil {
return nil, fmt.Errorf("GetIssueDependencyRecords: %w", err)
}
return out, nil
}
func (u *dependencyUseCaseImpl) GetWispDependencyRecords(ctx context.Context, wispIDs []string) (map[string][]*types.Dependency, error) {
if len(wispIDs) == 0 {
return map[string][]*types.Dependency{}, nil
}
out, err := u.depRepo.GetWispDependencyRecordsForIDs(ctx, wispIDs)
if err != nil {
return nil, fmt.Errorf("GetWispDependencyRecords: %w", err)
}
return out, nil
}
View on GitHub (pinned to 71377f2769)
Solutions
- Check the wrapped root error after the prefix
- Verify database health (bd doctor) and that no other process holds a conflicting lock
- Retry with a live context
Defensive patterns
Strategy: try-catch
Validate before calling
if len(issueIDs) == 0 { return map[string][]*types.Dependency{} } // mirrors the short-circuit Try / catch
recs, err := uc.GetIssueDependencyRecords(ctx, ids)
if err != nil {
// wrapped storage error; check DB health / context before retrying
return fmt.Errorf("dependency records unavailable: %w", err)
} Prevention
- Skip the call for empty ID slices (it short-circuits anyway)
- Pass live contexts with sufficient deadlines
- Monitor Dolt database health in long-running processes
When it happens
Trigger: Calling GetIssueDependencyRecords with one or more issueIDs when the underlying repository query fails — DB unreachable, query error, or context canceled.
Common situations: Corrupt or locked .beads Dolt database; connection pool exhaustion; canceled request context during shutdown.
Related errors
- no store is open for this workspace
- load dependency records: %w
- failed to load dependencies: %w
- failed to get dependency records: %w
- failed to get all dependency records: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/be9235915aa82947.
Report an issue: GitHub.