{"record":{"id":"2ba0cc078ed5f88a","repo":"gastownhall/beads","slug":"getwispdependencyrecords-w","errorCode":null,"errorMessage":"GetWispDependencyRecords: %w","messagePattern":"GetWispDependencyRecords: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/domain/dependency.go","lineNumber":821,"sourceCode":"\nfunc (u *dependencyUseCaseImpl) GetIssueDependencyRecords(ctx context.Context, issueIDs []string) (map[string][]*types.Dependency, error) {\n\tif len(issueIDs) == 0 {\n\t\treturn map[string][]*types.Dependency{}, nil\n\t}\n\tout, err := u.depRepo.GetDependencyRecordsForIssues(ctx, issueIDs)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"GetIssueDependencyRecords: %w\", err)\n\t}\n\treturn out, nil\n}\n\nfunc (u *dependencyUseCaseImpl) GetWispDependencyRecords(ctx context.Context, wispIDs []string) (map[string][]*types.Dependency, error) {\n\tif len(wispIDs) == 0 {\n\t\treturn map[string][]*types.Dependency{}, nil\n\t}\n\tout, err := u.depRepo.GetWispDependencyRecordsForIDs(ctx, wispIDs)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"GetWispDependencyRecords: %w\", err)\n\t}\n\treturn out, nil\n}\n","sourceCodeStart":803,"sourceCodeEnd":825,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/storage/domain/dependency.go#L803-L825","documentation":"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.","triggerScenarios":"Calling GetWispDependencyRecords with non-empty wispIDs when the repository query returns an error — storage unavailable, driver error, or context cancellation.","commonSituations":"Dolt backend locked or mid-compaction while wisps are being garbage-collected; transient connection drops; expired contexts in background cleanup jobs.","solutions":["Inspect the wrapped error after the prefix for the storage root cause","Confirm the .beads database is healthy and not locked (bd doctor)","Retry; wisp data is ephemeral, so missing wisps after GC may simply yield fewer records"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if len(wispIDs) == 0 { return map[string][]*types.Dependency{} }","typeGuard":null,"tryCatchPattern":"recs, err := uc.GetWispDependencyRecords(ctx, ids)\nif err != nil {\n    // storage failure during wisp lookup; safe to retry or degrade gracefully\n    recs = map[string][]*types.Dependency{}\n}","preventionTips":["Treat wisp reads as best-effort; wisps are ephemeral and may be GC'd","Retry on transient storage errors instead of failing the caller","Verify .beads DB is not locked during wisp maintenance windows"],"tags":["dependencies","wisps","storage"],"backgroundTag":"storage-query-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}