{"record":{"id":"eaab6761ac348e07","repo":"gastownhall/beads","slug":"proxy-server-store-needs-to-be-uow-provider","errorCode":null,"errorMessage":"proxy server store needs to be uow provider","messagePattern":"proxy server store needs to be uow provider","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/store_factory.go","lineNumber":272,"sourceCode":"func openNonMutatingStoreFromConfig(ctx context.Context, beadsDir string, preview bool) (storage.DoltStorage, error) {\n\tcfg, err := configfile.Load(beadsDir)\n\tif err != nil {\n\t\t// Same contract as newDoltStoreFromConfig: a present-but-unloadable\n\t\t// metadata.json is a hard error, not a silent embedded fallback —\n\t\t// and the error must name the real cause rather than the downstream\n\t\t// \"database not found\" the embedded open would produce.\n\t\treturn nil, fmt.Errorf(\"load %s: %w (refusing to fall back to the embedded store)\", configfile.ConfigPath(beadsDir), err)\n\t}\n\tif err := validateConfiguredBackend(cfg); err != nil {\n\t\treturn nil, err\n\t}\n\tcfg = normalizeLoadedConfig(cfg)\n\tif backend, ok := backends.Lookup(cfg.GetBackend()); ok {\n\t\treturn backend.OpenReadOnly(ctx, beadsDir)\n\t}\n\tif cfg != nil && cfg.IsDoltProxiedServerMode() {\n\t\t// TODO: this needs to be uow provider\n\t\treturn nil, fmt.Errorf(\"proxy server store needs to be uow provider\")\n\t\t// return newProxiedServerStore(ctx, &dolt.Config{\n\t\t// \tBeadsDir:      beadsDir,\n\t\t// \tDatabase:      cfg.GetDoltDatabase(),\n\t\t// \tProxiedServer: true,\n\t\t// \tReadOnly:      true,\n\t\t// })\n\t}\n\tif cfg != nil && cfg.IsDoltServerMode() {\n\t\treturn dolt.NewFromConfigWithOptions(ctx, beadsDir, &dolt.Config{ReadOnly: true})\n\t}\n\tdatabase := configfile.DefaultDoltDatabase\n\tif cfg != nil {\n\t\tdatabase = cfg.GetDoltDatabase()\n\t}\n\tif sanitized := sanitizeDBName(database); sanitized != database {\n\t\tdatabase = sanitized\n\t}\n\tif preview {","sourceCodeStart":254,"sourceCodeEnd":290,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/store_factory.go#L254-L290","documentation":"openNonMutatingStoreFromConfig has no read-only implementation for Dolt-proxied-server mode yet (TODO in source), so it returns this explicit error rather than constructing an unsupported proxied-server store. It is a deliberate 'not implemented' guard, not a user configuration mistake.","triggerScenarios":"A workspace whose metadata.json sets proxied-server Dolt mode (cfg.IsDoltProxiedServerMode()) and the caller requests a read-only or preview store; the backend registry Lookup did not produce a backend for the configured backend name.","commonSituations":"Dolt Pro/server-proxy setups using read-only bd commands (preview, read-only queries) before uow-provider support lands; environments where a generic backend registration is missing for the proxied server config.","solutions":["Avoid read-only/preview store paths in proxied-server mode until the uow provider is implemented (track the TODO in store_factory.go).","Ensure the backend is properly registered so backends.Lookup succeeds before reaching the proxy branch.","Switch the workspace to a standard Dolt SQL server backend for read-only workflows.","Implement or await backend.OpenReadOnly support for proxied server mode upstream."],"exampleFix":"// until uow provider exists, use the mutating store path or a normal server backend:\n// metadata.json -> \"backend\": \"dolt-server\" (not proxied server mode)","handlingStrategy":"validation","validationCode":"cfg, err := configfile.Load(beadsDir)\nif err == nil && cfg.IsDoltProxiedServerMode() {\n    // read-only/preview store unsupported for proxied server mode; use a mutating or server path\n}","typeGuard":null,"tryCatchPattern":"store, err := openNonMutatingStoreFromConfig(ctx, beadsDir)\nif err != nil {\n    if strings.Contains(err.Error(), \"needs to be uow provider\") {\n        // fall back to a standard server backend or wait for uow provider support\n    }\n    return err\n}","preventionTips":["Avoid read-only/preview commands in proxied-server mode until uow provider support lands.","Configure workspaces with a registered, standard Dolt backend for read-only workflows.","Track the TODO in store_factory.go for the uow provider implementation."],"tags":["proxy","not-implemented","storage","read-only"],"backgroundTag":"feature-not-implemented","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}