{"record":{"id":"bd1644f0378abdb3","repo":"gastownhall/beads","slug":"storage-backend-q-is-not-registered","errorCode":null,"errorMessage":"storage backend %q is not registered","messagePattern":"storage backend %q is not registered","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/store_factory_nocgo.go","lineNumber":40,"sourceCode":"\treturn false\n}\n\nfunc usesProxiedServer() bool {\n\tif shouldUseGlobals() {\n\t\treturn proxiedServerMode\n\t}\n\treturn cmdCtx != nil && cmdCtx.ProxiedServerMode\n}\n\n// newRegisteredBackendStore is the non-CGO twin of the CGO build's registry\n// factory: identical, since the backend registry does not depend on CGO. It\n// exists here too so the root pre-run's registry arm has one activating\n// construction path in both builds.\nfunc newRegisteredBackendStore(ctx context.Context, name, beadsDir string, readOnly bool) (s storage.DoltStorage, err error) {\n\tdefer func() { s, err = activateEventsJournalStore(beadsDir, s, err) }()\n\tbackend, ok := backends.Lookup(name)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"storage backend %q is not registered\", name)\n\t}\n\tif readOnly {\n\t\treturn backend.OpenReadOnly(ctx, beadsDir)\n\t}\n\treturn backend.Open(ctx, beadsDir)\n}\n\n// newDoltStore applies events-journal activation for the same reason its CGO\n// twin does — see the note at the top of events_journal.go.\nfunc newDoltStore(ctx context.Context, cfg *dolt.Config) (s storage.DoltStorage, err error) {\n\tdefer func() { s, err = activateEventsJournalStore(cfg.BeadsDir, s, err) }()\n\tif cfg.ProxiedServer {\n\t\t// TODO: this should not be a store\n\t\t// it should be a uow provider\n\t\treturn nil, fmt.Errorf(\"proxy server store should be uow provider\")\n\t}\n\tif !cfg.ServerMode {\n\t\treturn nil, fmt.Errorf(\"%s\", nocgoEmbeddedErrMsg)","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/store_factory_nocgo.go#L22-L58","documentation":"newRegisteredBackendStore returns this error when backends.Lookup(name) finds no registered backend for the configured name. It keeps the root pre-run's registry arm working in both CGO and no-CGO builds; the error means the metadata.json backend value does not correspond to any registered backend implementation in this build.","triggerScenarios":"metadata.json contains a backend string that is unknown or unregistered (typo, removed backend, backend added only in CGO builds while running the nocgo build); constructing a store with an arbitrary name that was never registered.","commonSituations":"Hand-edited backend field in metadata.json; switching between CGO and nocgo bd builds with backend-specific registrations; upgrading bd where a backend was renamed; fat-fingered backend names in scripts.","solutions":["Check the backend value in .beads/metadata.json and set it to a registered backend (e.g. the standard Dolt backend name).","Verify you are running a build that registers your backend (CGO vs nocgo build differences).","Run `bd doctor` / consult the backend registry list to see valid names.","Correct any typos in the backend name; match the exact registered identifier."],"exampleFix":"// before (metadata.json)\n\"backend\": \"doltdb\"\n// after\n\"backend\": \"dolt\"","handlingStrategy":"validation","validationCode":"cfg, _ := configfile.Load(beadsDir)\nname := cfg.GetBackend()\nif _, ok := backends.Lookup(name); !ok {\n    return fmt.Errorf(\"backend %q not registered in this build; fix metadata.json\", name)\n}","typeGuard":null,"tryCatchPattern":"s, err := newRegisteredBackendStore(ctx, name, beadsDir, readOnly)\nif err != nil {\n    // backend name unknown: check metadata.json backend value and build variant (cgo vs nocgo)\n    return err\n}","preventionTips":["Keep the backend value in metadata.json to a known registered name.","Be aware CGO vs nocgo builds may register different backends.","Run bd doctor to validate backend configuration.","Match backend names exactly — no fuzzy aliases."],"tags":["storage","backend","configuration","build-tags"],"backgroundTag":"unregistered-backend","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}