{"record":{"id":"9c98e5f6a41a5970","repo":"gastownhall/beads","slug":"proxied-server-root-path-v","errorCode":null,"errorMessage":"--proxied-server-root-path %v","messagePattern":"--proxied-server-root-path (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/init.go","lineNumber":477,"sourceCode":"\t\t\tif !initProxiedServer {\n\t\t\t\treturn fmt.Errorf(\"--proxied-server-log-path requires --proxied-server\")\n\t\t\t}\n\t\t\tif !filepath.IsAbs(serverLogPath) {\n\t\t\t\treturn fmt.Errorf(\"--proxied-server-log-path must be an absolute path, got %q\", serverLogPath)\n\t\t\t}\n\t\t\tif err := validateProxiedServerLogPath(serverLogPath); err != nil {\n\t\t\t\treturn fmt.Errorf(\"--proxied-server-log-path %v\", err)\n\t\t\t}\n\t\t}\n\t\tif serverRootPath != \"\" {\n\t\t\tif !initProxiedServer {\n\t\t\t\treturn fmt.Errorf(\"--proxied-server-root-path requires --proxied-server\")\n\t\t\t}\n\t\t\tif !filepath.IsAbs(serverRootPath) {\n\t\t\t\treturn fmt.Errorf(\"--proxied-server-root-path must be an absolute path, got %q\", serverRootPath)\n\t\t\t}\n\t\t\tif err := validateProxiedServerRootPath(serverRootPath); err != nil {\n\t\t\t\treturn fmt.Errorf(\"--proxied-server-root-path %v\", err)\n\t\t\t}\n\t\t}\n\t\tif serverProxyPort != 0 {\n\t\t\tif !initProxiedServer {\n\t\t\t\treturn fmt.Errorf(\"--proxied-server-port requires --proxied-server\")\n\t\t\t}\n\t\t\tif serverProxyPort < 1 || serverProxyPort > 65535 {\n\t\t\t\treturn fmt.Errorf(\"--proxied-server-port must be between 1 and 65535, got %d\", serverProxyPort)\n\t\t\t}\n\t\t}\n\t\tif idleTimeoutSet {\n\t\t\tif !initProxiedServer {\n\t\t\t\treturn fmt.Errorf(\"--proxied-server-idle-timeout requires --proxied-server\")\n\t\t\t}\n\t\t\tif serverProxyIdleTimeout < 0 {\n\t\t\t\treturn fmt.Errorf(\"--proxied-server-idle-timeout must be 0 (never) or a positive duration, got %s\", serverProxyIdleTimeout)\n\t\t\t}\n\t\t\tif serverProxyIdleTimeout == 0 {","sourceCodeStart":459,"sourceCodeEnd":495,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/init.go#L459-L495","documentation":"`validateProxiedServerRootPath` performs additional semantic checks on the root path beyond absoluteness (e.g. existence/type of the directory); when it fails, init wraps its message with the `--proxied-server-root-path` prefix. This surfaces path-level problems (wrong kind of file, unusable directory) at init time rather than when the server later starts.","triggerScenarios":"Running `bd init --proxied-server --proxied-server-root-path <abs path>` where the path passes filepath.IsAbs but fails validateProxiedServerRootPath — e.g. the path exists but is not a suitable root directory for the managed dolt sql-server.","commonSituations":"Pointing root-path at an existing regular file instead of a directory; typos in an absolute path pointing at a nonexistent location the validator expects to be prepared; stale paths left over from a moved data volume.","solutions":["Read the wrapped message after the prefix — it names the specific validation failure — and correct the path accordingly.","Ensure the path refers to the expected directory (create it if the validator requires it to exist).","Point `--proxied-server-root-path` at a fresh, dedicated directory for the dolt data root."],"exampleFix":"// before\nbd init --proxied-server --proxied-server-root-path /etc/hosts   // exists, but not a directory\n// after\nmkdir -p /var/lib/beads/dolt-root\nbd init --proxied-server --proxied-server-root-path /var/lib/beads/dolt-root","handlingStrategy":"validation","validationCode":"#!/usr/bin/env bash\nROOT=\"/var/lib/beads/dolt-root\"\nif [ -e \"$ROOT\" ] && [ ! -d \"$ROOT\" ]; then\n  echo \"$ROOT exists but is not a directory\" >&2; exit 2\nfi\nmkdir -p \"$ROOT\"","typeGuard":"func usableRootPath(p string) bool { return filepath.IsAbs(p) && isDir(p) }","tryCatchPattern":"if out, err := exec.Command(\"bd\", \"init\", args...).CombinedOutput(); err != nil {\n    if strings.Contains(string(out), \"--proxied-server-root-path\") && !strings.Contains(string(out), \"absolute\") {\n        // parse wrapped message for the specific path problem and fix the path\n    }\n}","preventionTips":["Pre-provision the root directory with mkdir -p before running bd init.","Verify the path is a directory, not a file, before pointing --proxied-server-root-path at it.","Keep data-root paths in one config source to avoid stale paths after volume moves."],"tags":["cli","flag-validation","path","init"],"backgroundTag":"invalid-flag-value","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}