gastownhall/beads · error

hydrate issue comments: %w

Error message

hydrate issue comments: %w

What it means

When includeComments is true, hydrateIssueOperation loads the issue's comments and wraps failures with 'hydrate issue comments:'. Comments are optional in the payload but explicitly requested ones must load fully or the operation errors. Failures come from GetCommentsForIssue or GetCommentsForWisp depending on which plane the issue lives on.

Source

Thrown at internal/storage/uow/issue_operations.go:199

		records, err = dependencies.GetIssueDependencyRecords(ctx, []string{clone.ID})
	}
	if err != nil {
		return nil, fmt.Errorf("hydrate issue dependencies: %w", err)
	}
	clone.Dependencies = records[clone.ID]

	if includeComments {
		comments := uw.CommentUseCase()
		if comments == nil {
			return nil, fmt.Errorf("hydrate issue comments: comment use case is unavailable")
		}
		if useWisp {
			clone.Comments, err = comments.GetCommentsForWisp(ctx, clone.ID)
		} else {
			clone.Comments, err = comments.GetCommentsForIssue(ctx, clone.ID)
		}
		if err != nil {
			return nil, fmt.Errorf("hydrate issue comments: %w", err)
		}
	}
	return storageissueops.CloneCreateRequest(publicops.CreateRequest{Issue: clone}).Issue, nil
}

// Update updates one issue in a retried unit-of-work transaction.
func (o *issueOperations) Update(ctx context.Context, request publicops.UpdateRequest) (publicops.UpdateResult, error) {
	snapshot := storageissueops.CloneUpdateRequest(request)
	if err := validateUpdateRequest(snapshot); err != nil {
		return publicops.UpdateResult{}, err
	}
	return RunTxResult(ctx, o.provider, func(ctx context.Context, uw UnitOfWork) (publicops.UpdateResult, string, error) {
		attempt := storageissueops.CloneUpdateRequest(snapshot)
		spec, err := updateSpec(attempt)
		if err != nil {
			return publicops.UpdateResult{}, "", validationError(err)
		}
		before, _, err := operationIssue(ctx, uw, attempt.IssueID, attempt.IssuePlaneOnly)

View on GitHub (pinned to 71377f2769)

Solutions

  1. Inspect the wrapped inner error for the actual comment-query failure.
  2. Retry the verb; transient storage errors resolve on re-run of the UoW transaction.
  3. If comments are not needed, call the operation without requesting comments to skip this path.
Defensive patterns

Strategy: retry

Try / catch

if err != nil {
    if isTransientStorage(err) { return retryVerb() }
    return err
}

Prevention

When it happens

Trigger: Create/Update/Close called with comments requested, and the comment query errors while the issue sits on the wisp or issue plane.

Common situations: Comment tables unavailable or corrupted; plane mismatch (wisp vs issue) after a storage-mode change; transient DB failure mid-transaction.

Related errors


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