gastownhall/beads · error

proxy server store needs to be uow provider

Error message

proxy server store needs to be uow provider

What it means

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.

Source

Thrown at cmd/bd/store_factory.go:272

func openNonMutatingStoreFromConfig(ctx context.Context, beadsDir string, preview bool) (storage.DoltStorage, error) {
	cfg, err := configfile.Load(beadsDir)
	if err != nil {
		// Same contract as newDoltStoreFromConfig: a present-but-unloadable
		// metadata.json is a hard error, not a silent embedded fallback —
		// and the error must name the real cause rather than the downstream
		// "database not found" the embedded open would produce.
		return nil, fmt.Errorf("load %s: %w (refusing to fall back to the embedded store)", configfile.ConfigPath(beadsDir), err)
	}
	if err := validateConfiguredBackend(cfg); err != nil {
		return nil, err
	}
	cfg = normalizeLoadedConfig(cfg)
	if backend, ok := backends.Lookup(cfg.GetBackend()); ok {
		return backend.OpenReadOnly(ctx, beadsDir)
	}
	if cfg != nil && cfg.IsDoltProxiedServerMode() {
		// TODO: this needs to be uow provider
		return nil, fmt.Errorf("proxy server store needs to be uow provider")
		// return newProxiedServerStore(ctx, &dolt.Config{
		// 	BeadsDir:      beadsDir,
		// 	Database:      cfg.GetDoltDatabase(),
		// 	ProxiedServer: true,
		// 	ReadOnly:      true,
		// })
	}
	if cfg != nil && cfg.IsDoltServerMode() {
		return dolt.NewFromConfigWithOptions(ctx, beadsDir, &dolt.Config{ReadOnly: true})
	}
	database := configfile.DefaultDoltDatabase
	if cfg != nil {
		database = cfg.GetDoltDatabase()
	}
	if sanitized := sanitizeDBName(database); sanitized != database {
		database = sanitized
	}
	if preview {

View on GitHub (pinned to 71377f2769)

Solutions

  1. Avoid read-only/preview store paths in proxied-server mode until the uow provider is implemented (track the TODO in store_factory.go).
  2. Ensure the backend is properly registered so backends.Lookup succeeds before reaching the proxy branch.
  3. Switch the workspace to a standard Dolt SQL server backend for read-only workflows.
  4. Implement or await backend.OpenReadOnly support for proxied server mode upstream.

Example fix

// until uow provider exists, use the mutating store path or a normal server backend:
// metadata.json -> "backend": "dolt-server" (not proxied server mode)
Defensive patterns

Strategy: validation

Validate before calling

cfg, err := configfile.Load(beadsDir)
if err == nil && cfg.IsDoltProxiedServerMode() {
    // read-only/preview store unsupported for proxied server mode; use a mutating or server path
}

Try / catch

store, err := openNonMutatingStoreFromConfig(ctx, beadsDir)
if err != nil {
    if strings.Contains(err.Error(), "needs to be uow provider") {
        // fall back to a standard server backend or wait for uow provider support
    }
    return err
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30). Data as JSON: /api/errors/eaab6761ac348e07. Report an issue: GitHub.