gastownhall/beads · error
failed to commit is_blocked repairs to Dolt: %w
Error message
failed to commit is_blocked repairs to Dolt: %w
What it means
repairBlockedState recomputes the is_blocked flag for all issues during `bd doctor` and persists the corrections as a Dolt commit. After staging the changed rows with DOLT_ADD, it runs DOLT_COMMIT; if the commit fails for any reason other than the benign nothing-to-commit case, this error wraps that failure and aborts the repair, leaving the corrections staged but uncommitted.
Source
Thrown at cmd/bd/doctor/fix/blocked.go:89
return fmt.Errorf("failed to commit is_blocked repairs: %w", err)
}
if changed == 0 {
fmt.Println(" is_blocked already consistent — nothing to fix")
return nil
}
// Persist the corrected flags as a Dolt commit, staging only issues — the
// synced table is_blocked lives on (wisps are dolt_ignore'd). This path keeps
// its own fresh-DB lifecycle rather than the shared store helper, but it must
// not report success on a failed commit: a swallowed DOLT_COMMIT error would
// leave the repair in the working set only, silently undone by the next pull.
// bd doctor is server-mode only, so the server supplies the commit identity.
if _, err := db.ExecContext(ctx, "CALL DOLT_ADD(?)", "issues"); err != nil {
return fmt.Errorf("failed to stage is_blocked repairs: %w", err)
}
if _, err := db.ExecContext(ctx, "CALL DOLT_COMMIT('-m', 'doctor: recompute is_blocked for all issues')"); err != nil && !issueops.IsNothingToCommitError(err) {
return fmt.Errorf("failed to commit is_blocked repairs to Dolt: %w", err)
}
fmt.Printf(" Recomputed is_blocked: %d row(s) corrected\n", changed)
return nil
}
View on GitHub (pinned to 71377f2769)
Solutions
- Run `bd doctor` again after checking `bd dolt doctor`/Dolt health; staged changes may succeed on retry once the transient storage issue clears.
- Inspect the underlying Dolt error in the %w chain (storage lock, permissions, disk space) and fix that root cause.
- Verify no other bd process holds the Dolt working set concurrently, then re-run the repair.
- As a last resort, reset the Dolt working set (`bd dolt reset` equivalents) and recompute is_blocked so a fresh commit can be made.
Defensive patterns
Strategy: try-catch
Validate before calling
// Before the repair, confirm Dolt is writable and no pending conflict: // bd doctor (server mode) should report a healthy Dolt store // and `git status`-like working-set cleanliness via the driver.
Try / catch
if err := RecomputeBlocked(ctx, db); err != nil {
var commitErr error
if strings.Contains(err.Error(), "failed to commit is_blocked repairs") {
commitErr = err // inspect wrapped driver error, re-run after fixing storage
}
return commitErr
} Prevention
- Run doctor in server mode so the server supplies commit identity, as designed
- Ensure no concurrent bd process writes to the same Dolt store
- Monitor disk space and .beads store health before large repairs
- Re-run doctor after any failure — the repair is designed to be idempotent
When it happens
Trigger: DOLT_COMMIT fails inside repairBlockedState (cmd/bd/doctor/fix/blocked.go:89) when staged is_blocked repairs cannot be committed — e.g. Dolt storage errors, merge/ref conflicts in the working set, or a commit identity problem not covered by IsNothingToCommitError.
Common situations: Corrupted or locked Dolt database, running against a workspace whose Dolt history conflicts with a prior partial repair, disk-full or permission problems in .beads storage, or a Dolt version mismatch changing CALL DOLT_COMMIT semantics.
Related errors
- failed to commit dependency key repairs: %w
- failed to load config: %w
- failed to scan dependency keys: %w
- failed to begin transaction: %w
- failed to query orphaned dependencies: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/41dc13acb042c82c.
Report an issue: GitHub.