gastownhall/beads · error

GetWispDependencyRecords: %w

Error message

GetWispDependencyRecords: %w

What it means

GetWispDependencyRecords fetches dependency records for wisp (ephemeral) issue IDs via depRepo.GetWispDependencyRecordsForIDs. This error wraps a failure of that repository lookup. Empty wispIDs returns an empty map immediately, so the error only occurs for non-empty queries failing at the storage layer.

Source

Thrown at internal/storage/domain/dependency.go:821

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

  1. Inspect the wrapped error after the prefix for the storage root cause
  2. Confirm the .beads database is healthy and not locked (bd doctor)
  3. Retry; wisp data is ephemeral, so missing wisps after GC may simply yield fewer records
Defensive patterns

Strategy: try-catch

Validate before calling

if len(wispIDs) == 0 { return map[string][]*types.Dependency{} }

Try / catch

recs, err := uc.GetWispDependencyRecords(ctx, ids)
if err != nil {
    // storage failure during wisp lookup; safe to retry or degrade gracefully
    recs = map[string][]*types.Dependency{}
}

Prevention

When it happens

Trigger: Calling GetWispDependencyRecords with non-empty wispIDs when the repository query returns an error — storage unavailable, driver error, or context cancellation.

Common situations: Dolt backend locked or mid-compaction while wisps are being garbage-collected; transient connection drops; expired contexts in background cleanup jobs.

Related errors


AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30). Data as JSON: /api/errors/2ba0cc078ed5f88a. Report an issue: GitHub.