{"record":{"id":"41dc13acb042c82c","repo":"gastownhall/beads","slug":"failed-to-commit-is-blocked-repairs-to-dolt-w","errorCode":null,"errorMessage":"failed to commit is_blocked repairs to Dolt: %w","messagePattern":"failed to commit is_blocked repairs to Dolt: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/doctor/fix/blocked.go","lineNumber":89,"sourceCode":"\t\treturn fmt.Errorf(\"failed to commit is_blocked repairs: %w\", err)\n\t}\n\n\tif changed == 0 {\n\t\tfmt.Println(\"  is_blocked already consistent — nothing to fix\")\n\t\treturn nil\n\t}\n\n\t// Persist the corrected flags as a Dolt commit, staging only issues — the\n\t// synced table is_blocked lives on (wisps are dolt_ignore'd). This path keeps\n\t// its own fresh-DB lifecycle rather than the shared store helper, but it must\n\t// not report success on a failed commit: a swallowed DOLT_COMMIT error would\n\t// leave the repair in the working set only, silently undone by the next pull.\n\t// bd doctor is server-mode only, so the server supplies the commit identity.\n\tif _, err := db.ExecContext(ctx, \"CALL DOLT_ADD(?)\", \"issues\"); err != nil {\n\t\treturn fmt.Errorf(\"failed to stage is_blocked repairs: %w\", err)\n\t}\n\tif _, err := db.ExecContext(ctx, \"CALL DOLT_COMMIT('-m', 'doctor: recompute is_blocked for all issues')\"); err != nil && !issueops.IsNothingToCommitError(err) {\n\t\treturn fmt.Errorf(\"failed to commit is_blocked repairs to Dolt: %w\", err)\n\t}\n\n\tfmt.Printf(\"  Recomputed is_blocked: %d row(s) corrected\\n\", changed)\n\treturn nil\n}\n","sourceCodeStart":71,"sourceCodeEnd":95,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/doctor/fix/blocked.go#L71-L95","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Before the repair, confirm Dolt is writable and no pending conflict:\n// bd doctor (server mode) should report a healthy Dolt store\n// and `git status`-like working-set cleanliness via the driver.","typeGuard":null,"tryCatchPattern":"if err := RecomputeBlocked(ctx, db); err != nil {\n\tvar commitErr error\n\tif strings.Contains(err.Error(), \"failed to commit is_blocked repairs\") {\n\t\tcommitErr = err // inspect wrapped driver error, re-run after fixing storage\n\t}\n\treturn commitErr\n}","preventionTips":["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"],"tags":["dolt","doctor","commit","database"],"backgroundTag":"dolt-commit-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}