{"record":{"id":"c37735851ddc68f1","repo":"gastownhall/beads","slug":"uow-doltbinexec-must-not-be-empty","errorCode":null,"errorMessage":"uow: doltBinExec must not be empty","messagePattern":"uow: doltBinExec must not be empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/uow/doltserver_provider.go","lineNumber":45,"sourceCode":"\tidleTimeout time.Duration,\n\tteamServer bool,\n\texpectedProjectID string,\n\topts ...ProviderOption,\n) (UnitOfWorkProvider, error) {\n\tif idleTimeout == 0 {\n\t\tidleTimeout = defaultProxyIdleTimeout\n\t}\n\tif database == \"\" {\n\t\treturn nil, fmt.Errorf(\"uow: database name must not be empty (caller should default to %q)\", \"beads\")\n\t}\n\tif err := backend.Validate(); err != nil {\n\t\treturn nil, fmt.Errorf(\"uow: backend: %w\", err)\n\t}\n\tif rootUser == \"\" {\n\t\treturn nil, fmt.Errorf(\"uow: rootUser must not be empty\")\n\t}\n\tif doltBinExec == \"\" {\n\t\treturn nil, fmt.Errorf(\"uow: doltBinExec must not be empty\")\n\t}\n\n\tabsServerRootDir, err := filepath.Abs(serverRootDir)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"uow: resolving server root dir: %w\", err)\n\t}\n\tabsDoltBinExec, err := filepath.Abs(doltBinExec)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"uow: resolving dolt bin exec: %w\", err)\n\t}\n\n\tif err := os.MkdirAll(absServerRootDir, config.BeadsDirPerm); err != nil {\n\t\treturn nil, fmt.Errorf(\"uow: creating server root directory: %w\", err)\n\t}\n\n\tep, err := proxy.GetCreateDatabaseProxyServerEndpoint(absServerRootDir, proxy.OpenOpts{\n\t\tBackend:        backend,\n\t\tConfigFilePath: serverConfigFilePath,","sourceCodeStart":27,"sourceCodeEnd":63,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/storage/uow/doltserver_provider.go#L27-L63","documentation":"NewDoltServerUOWProvider needs the path to the dolt binary (doltBinExec) so it can launch/manage the Dolt SQL server. An empty path is rejected before any filesystem work. Without it the proxy cannot spawn or supervise the server process.","triggerScenarios":"Calling NewDoltServerUOWProvider with doltBinExec == \"\", typically because the dolt binary was not found on PATH and the lookup returned an empty string, or the config field was never set.","commonSituations":"Dolt not installed; exec.LookPath(\"dolt\") result ignored; container images missing the dolt binary; config default pointing at a variable that resolved to empty.","solutions":["Install dolt and pass its resolved path, e.g. from exec.LookPath(\"dolt\")","Fail early with a clear message if LookPath returns an error instead of passing \"\"","Set the binary path explicitly in config for non-standard installs"],"exampleFix":"// before\nprov, err := NewDoltServerUOWProvider(ctx, dir, db, log, cfg, backend, \"root\", \"\", cfg.DoltBin, ...)\n// after\ndoltBin, err := exec.LookPath(\"dolt\")\nif err != nil { return fmt.Errorf(\"dolt binary not found: %w\", err) }\nprov, err := NewDoltServerUOWProvider(ctx, dir, db, log, cfg, backend, \"root\", \"\", doltBin, ...)","handlingStrategy":"validation","validationCode":"doltBin, err := exec.LookPath(\"dolt\")\nif err != nil {\n    return fmt.Errorf(\"dolt binary not found on PATH; install dolt first: %w\", err)\n}\n// pass doltBin as doltBinExec","typeGuard":"func doltBinaryAvailable(path string) bool {\n    if path == \"\" { return false }\n    p, err := exec.LookPath(path)\n    return err == nil && p != \"\"\n}","tryCatchPattern":"prov, err := NewDoltServerUOWProvider(..., doltBin, ...)\nif err != nil && strings.Contains(err.Error(), \"doltBinExec must not be empty\") {\n    return fmt.Errorf(\"install dolt or set dolt_bin in config: %w\", err)\n}","preventionTips":["Resolve the dolt binary with exec.LookPath at startup and fail fast with a clear message","In containers, verify the dolt binary exists in the image build","Set an explicit binary path in config for non-standard installs"],"tags":["validation","config","dolt","binary"],"backgroundTag":"missing-required-parameter","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}