{"record":{"id":"eaf7f5cd72c50a8b","repo":"gastownhall/beads","slug":"getnewlyunblockedbyclose-s-w","errorCode":null,"errorMessage":"GetNewlyUnblockedByClose %s: %w","messagePattern":"GetNewlyUnblockedByClose (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/domain/issue.go","lineNumber":1782,"sourceCode":"\t}\n\treturn open, nil\n}\n\nfunc (u *issueUseCaseImpl) GetNewlyUnblockedByClose(ctx context.Context, closedID string) ([]*types.Issue, error) {\n\treturn u.getNewlyUnblockedByClose(ctx, closedID)\n}\n\nfunc (u *issueUseCaseImpl) GetNewlyUnblockedByCloseWisp(ctx context.Context, closedID string) ([]*types.Issue, error) {\n\treturn u.getNewlyUnblockedByClose(ctx, closedID)\n}\n\nfunc (u *issueUseCaseImpl) getNewlyUnblockedByClose(ctx context.Context, closedID string) ([]*types.Issue, error) {\n\tif closedID == \"\" {\n\t\treturn nil, fmt.Errorf(\"GetNewlyUnblockedByClose: closedID must not be empty\")\n\t}\n\tout, err := u.issueRepo.GetNewlyUnblockedByClose(ctx, closedID)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"GetNewlyUnblockedByClose %s: %w\", closedID, err)\n\t}\n\treturn out, nil\n}\n\nfunc (u *issueUseCaseImpl) ClaimReadyIssue(ctx context.Context, filter types.WorkFilter, actor string) (ClaimReadyResult, error) {\n\treturn u.claimReady(ctx, filter, actor, false)\n}\n\nfunc (u *issueUseCaseImpl) ClaimReadyWisp(ctx context.Context, filter types.WorkFilter, actor string) (ClaimReadyResult, error) {\n\treturn u.claimReady(ctx, filter, actor, true)\n}\n\nfunc (u *issueUseCaseImpl) claimReady(ctx context.Context, filter types.WorkFilter, actor string, useWisp bool) (ClaimReadyResult, error) {\n\tvar (\n\t\tissue *types.Issue\n\t\terr   error\n\t)\n\tif useWisp {","sourceCodeStart":1764,"sourceCodeEnd":1800,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/storage/domain/issue.go#L1764-L1800","documentation":"Returned by getNewlyUnblockedByClose when the repository call issueRepo.GetNewlyUnblockedByClose fails while fetching issues unblocked by closing closedID. The closed issue ID and the wrapped underlying error are included, preserving the root cause via %w. This is a storage-layer failure passed through the use-case layer.","triggerScenarios":"Calling GetNewlyUnblockedByClose / GetNewlyUnblockedByCloseWisp with a non-empty closedID whose dependent lookup fails: closedID references a nonexistent issue, the database connection fails, or the blockers/dependencies query errors.","commonSituations":"Post-close webhooks querying dependents of an issue that was deleted concurrently; Dolt connection reset during the query; stale ID cached from a previous session pointing at a purged issue.","solutions":["Read the wrapped error after 'GetNewlyUnblockedByClose <id>:' for the root cause","Verify closedID exists before closing/unblocking logic runs","Retry on transient storage errors; check DB connectivity if persistent"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if _, err := uc.GetIssue(ctx, closedID); err != nil {\n    return fmt.Errorf(\"closed issue %s not found: %w\", closedID, err)\n}","typeGuard":"func hasID(id string) bool { return strings.TrimSpace(id) != \"\" }","tryCatchPattern":"unblocked, err := uc.GetNewlyUnblockedByClose(ctx, closedID)\nif err != nil {\n    log.Warnf(\"unblocked lookup failed for %s: %v\", closedID, err)\n    return nil\n}","preventionTips":["Confirm the issue exists before closing/unblocking workflows","Retry transient storage errors with backoff","Verify DB connectivity in long-running agent loops","Keep schema migrations current"],"tags":["go","storage","error-wrapping","dependency-query"],"backgroundTag":"repository-query-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}