gastownhall/beads · error
GetEpicsEligibleForClosure: %w
Error message
GetEpicsEligibleForClosure: %w
What it means
Wrapped error from GetEpicsEligibleForClosure in the issue use-case layer. The repo query for epics whose children are all closed is delegated to issueRepo; any failure is prefixed with "GetEpicsEligibleForClosure: ". It signals a storage-layer failure, not a caller-input problem (the method takes no arguments).
Source
Thrown at internal/storage/domain/issue.go:1873
out, err := u.issueRepo.IterEvents(ctx, id, limit)
if err != nil {
return nil, fmt.Errorf("IterEvents: %w", err)
}
return out, nil
}
func (u *issueUseCaseImpl) GetStaleIssues(ctx context.Context, filter types.StaleFilter) ([]*types.Issue, error) {
out, err := u.issueRepo.GetStaleIssues(ctx, filter)
if err != nil {
return nil, fmt.Errorf("GetStaleIssues: %w", err)
}
return out, nil
}
func (u *issueUseCaseImpl) GetEpicsEligibleForClosure(ctx context.Context) ([]*types.EpicStatus, error) {
out, err := u.issueRepo.GetEpicsEligibleForClosure(ctx)
if err != nil {
return nil, fmt.Errorf("GetEpicsEligibleForClosure: %w", err)
}
return out, nil
}
func (u *issueUseCaseImpl) Unclaim(ctx context.Context, id, actor string, force bool) error {
if id == "" {
return fmt.Errorf("Unclaim: id must not be empty")
}
if err := u.issueRepo.UnclaimIssue(ctx, id, actor, force); err != nil {
return fmt.Errorf("Unclaim: %w", err)
}
return nil
}
// UnclaimIfAssignee is the compare-and-swap release: it clears the claim only
// while the issue is still assigned to expectedAssignee, and otherwise returns
// storage.ErrAssigneeMismatch having written nothing. It is the conditional
// twin of Unclaim and runs the SAME transition (assignee cleared, statusView on GitHub (pinned to 71377f2769)
Solutions
- Unwrap the error to find the underlying repository cause
- Check database connectivity and schema integrity
- Retry the sweep if the underlying error is transient
Defensive patterns
Strategy: retry
Try / catch
epics, err := uc.GetEpicsEligibleForClosure(ctx)
if err != nil {
if isTransient(err) {
return retryWithBackoff(op)
}
return err
} Prevention
- Run epic-closure sweeps after DB health checks pass
- Avoid running the sweep during schema migrations
- Retry with backoff since the call takes no parameters and is idempotent
When it happens
Trigger: Calling GetEpicsEligibleForClosure(ctx) when the repository query fails: database unavailable, schema/query error, or transaction conflict.
Common situations: Running epic-closure sweeps in scripts or hooks while the Dolt database is down or the schema is being migrated.
Related errors
- not found
- load wisp labels: %w
- edge %d %s->%s: checking planned blocking cycle: %w
- reading existing dependencies for %s: %w
- searching children of %s: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/854a7b8ebf94d67f.
Report an issue: GitHub.