gastownhall/beads · error
creating .bd-dolt-ok marker: %w
Error message
creating .bd-dolt-ok marker: %w
What it means
DoltFormat seeds a .bd-dolt-ok marker file inside a pre-v56 .dolt directory so newer bd/Dolt versions know the directory is compatible. If MarkDoltDirCompatible cannot create or write that marker, the error is wrapped as "creating .bd-dolt-ok marker: %w" — typically a filesystem permission or path problem, not a Dolt problem.
Source
Thrown at cmd/bd/doctor/fix/dolt_format.go:26
)
// DoltFormat fixes the "Dolt Format" warning by seeding the .bd-dolt-ok marker
// for pre-0.56 dolt databases that are otherwise functional.
//
// In server mode, the .beads/dolt/.dolt/ directory is vestigial from an older
// embedded Dolt setup. The data lives on the Dolt server. Seeding the marker
// tells future doctor checks that this database has been acknowledged.
func DoltFormat(path string) error {
// resolveBeadsDir follows .beads/redirect to find the actual beads directory
beadsDir := resolveBeadsDir(filepath.Join(path, ".beads"))
doltDir := filepath.Join(beadsDir, "dolt")
if !doltserver.IsPreV56DoltDir(doltDir) {
return nil // Already OK or no .dolt/ directory
}
if err := doltserver.MarkDoltDirCompatible(doltDir); err != nil {
return fmt.Errorf("creating .bd-dolt-ok marker: %w", err)
}
fmt.Printf(" Seeded .bd-dolt-ok marker in %s\n", doltDir)
return nil
}
View on GitHub (pinned to 71377f2769)
Solutions
- Fix permissions so the current user can write inside <repo>/.dolt (chown/chmod)
- Check that the filesystem/mount is writable (not read-only)
- Re-run `bd doctor` after fixing access; if persistent, manually create an empty .bd-dolt-ok file in the .dolt directory
Example fix
// before $ bd doctor # creating .bd-dolt-ok marker: permission denied // after $ sudo chown -R $(whoami) .dolt/ $ bd doctor # Seeded .bd-dolt-ok marker in .dolt/
Defensive patterns
Strategy: validation
Validate before calling
info, err := os.Stat(filepath.Join(doltDir, ".bd-dolt-ok"))
if err == nil && !info.IsDir() {
return nil // marker already present; skip
}
if info, err := os.Stat(doltDir); err != nil || !info.IsDir() {
return fmt.Errorf("dolt dir %s missing or inaccessible", doltDir)
}
if f, err := os.OpenFile(filepath.Join(doltDir, ".probe"), os.O_CREATE|os.O_WRONLY, 0o644); err != nil {
return fmt.Errorf("%s is not writable: %w", doltDir, err)
} else {
f.Close(); os.Remove(filepath.Join(doltDir, ".probe"))
} Try / catch
if err := fix.DoltFormat(doltDir); err != nil {
if strings.Contains(err.Error(), "creating .bd-dolt-ok marker") {
log.Printf("fix permissions on %s and retry: %v", doltDir, err)
}
return err
} Prevention
- Run bd as a user with write access to the repo's .dolt directory
- Avoid read-only mounts for working repositories
- Pre-seed the .bd-dolt-ok marker when provisioning repos in CI/containers
When it happens
Trigger: Running `bd doctor` format fix on a repo whose .dolt directory is pre-v56 format, when the process cannot write .bd-dolt-ok into doltDir: read-only filesystem, wrong ownership/permissions, or doltDir path issues (symlink, deleted mid-run).
Common situations: Repository cloned by another user with root-owned .dolt; repo checked out on a read-only mount or container volume; running bd with a restricted user/UID in CI.
Related errors
- dolt path is not executable
- unable to read plugin file: %w
- failed to remove Dolt database: %w
- read .beads/.gitignore: %w
- inspecting remote target %s: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/c76137237f2f1624.
Report an issue: GitHub.