gastownhall/beads · error

dolt auto-commit: %w

Error message

dolt auto-commit: %w

What it means

Wraps a failure from shouldCommitCreatePostWrites, the check that decides whether a follow-up Dolt commit is needed after a bare (edge-less) embedded create. The issue itself was created successfully; only the post-create auto-commit decision failed.

Source

Thrown at cmd/bd/create_form.go:201

		}

		depSpecs = append(depSpecs, domain.DependencySpec{Type: depType, TargetID: dependsOnID})
	}

	// The issue and its edges (parent-child per GH#1983, plus form deps)
	// commit in one transaction; a failed edge rolls back the create instead
	// of leaving a dep-less issue behind (same contract as bd create).
	edges := createDepEdges{parentID: fv.ParentID, specs: depSpecs}
	if err := createIssueWithDeps(ctx, s, issue, actor, edges); err != nil {
		return nil, fmt.Errorf("failed to create issue: %w", err)
	}

	if edges.empty() {
		// Bare create: preserve the embedded-mode follow-up Dolt commit.
		// The deps path commits inside its transaction instead.
		shouldCommit, err := shouldCommitCreatePostWrites(issue, false)
		if err != nil {
			return nil, fmt.Errorf("dolt auto-commit: %w", err)
		}
		if shouldCommit {
			commitMsg := fmt.Sprintf("bd: create %s", issue.ID)
			if err := s.Commit(ctx, commitMsg); err != nil && !isDoltNothingToCommit(err) {
				WarnError("failed to commit post-create metadata: %v", err)
			}
		}
	}

	return issue, nil
}

var createFormCmd = &cobra.Command{
	Use:     "create-form",
	GroupID: "issues",
	Short:   "Create a new issue using an interactive form",
	Long: `Create a new issue using an interactive terminal form.

View on GitHub (pinned to 71377f2769)

Solutions

  1. Check the wrapped error for the underlying cause
  2. Verify the issue was actually created (`bd list`) — it likely was
  3. Run `bd doctor` on the embedded database
  4. If metadata (labels etc.) is missing, `bd dolt push` or re-commit manually
Defensive patterns

Strategy: try-catch

Try / catch

issue, err := CreateIssueFromFormValues(ctx, fv)
if err != nil && strings.Contains(err.Error(), "dolt auto-commit") {
    // creation likely succeeded; verify and commit metadata manually
    log.Printf("post-create commit decision failed: %v", err)
}

Prevention

When it happens

Trigger: CreateIssueFromFormValues completes a bare create (no parent, no deps) and shouldCommitCreatePostWrites returns an error while evaluating embedded-mode commit policy.

Common situations: Embedded Dolt session in a bad state; storage driver not exposing commit capability; misconfigured embedded mode.

Related errors


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