{"record":{"id":"0fa8ceb1b72f7f89","repo":"gastownhall/beads","slug":"proxied-server-provider-t-does-not-offer-the-impo","errorCode":null,"errorMessage":"proxied-server provider %T does not offer the import surface","messagePattern":"proxied-server provider %T does not offer the import surface","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/import_proxied_server.go","lineNumber":26,"sourceCode":"\n\t\"github.com/steveyegge/beads/internal/config\"\n\t\"github.com/steveyegge/beads/internal/storage/uow\"\n\t\"github.com/steveyegge/beads/internal/types\"\n\tpublicops \"github.com/steveyegge/beads/issueops\"\n)\n\n// proxiedImporter hands back the guarded bulk-import surface for the\n// proxied-server provider, through the provider's OWN capability accessor —\n// the same two-step proxiedIssueReader and proxiedBatchCloser perform, and\n// for the same reason: the accessor is where each layer is added, so a\n// command that reached for the constructor would get an unlayered importer.\nfunc proxiedImporter() (publicops.Importer, error) {\n\tif uowProvider == nil {\n\t\treturn nil, errors.New(\"proxied-server UOW provider not initialized\")\n\t}\n\tsrc, ok := uowProvider.(uow.ImporterSource)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"proxied-server provider %T does not offer the import surface\", uowProvider)\n\t}\n\treturn src.Importer()\n}\n\n// runImportRecordsProxied is the proxied-server import pipeline over the\n// parsed records. It mirrors runImportRecordsClassic stage for stage — dedup,\n// dry-run classification, stale pre-filter, batch write, issue_prefix\n// reconciliation — through the SAME classification and reporting code, with\n// two deliberate structural differences:\n//\n//   - ONE COMMIT PER INVOCATION. The classic path chunks a large import into\n//     bounded transactions (a SQLite write-lock fairness measure) and commits\n//     the issue_prefix sync separately; the proxied path has no PostRun\n//     auto-commit and the whole import — rows, memories, prefix sync — lands\n//     in ONE unit of work with ONE history entry, the Importer capability's\n//     contract.\n//\n//   - The stale guard keeps its classic two-half shape: the pre-filter runs in","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/import_proxied_server.go#L8-L44","documentation":"In proxied-server mode, import goes through a provider object that must implement the uow.ImporterSource interface; proxiedImporter type-asserts it and errors if the concrete provider type lacks the import surface. This is an internal wiring/compatibility defect, not user input.","triggerScenarios":"Running `bd import` while using the proxied-server backend (usesProxiedServer() true) with a uowProvider build/wiring that does not implement uow.ImporterSource — typically a version-skew binary, plugin, or misconstructed provider injected at startup.","commonSituations":"Mixed-version bd binaries/plugins where the server provider predates the import surface; custom or test providers substituted for the real one; env routing (proxied server flags) pointing import at an incompatible backend.","solutions":["Upgrade the bd binary (and any plugins) so server and client versions match and the provider implements the import surface","Bypass the proxied backend: unset the proxied-server routing/env so the classic embedded import path runs","Check how uowProvider is initialized; if custom, implement uow.ImporterSource and return a real publicops.Importer","File/report the %T type in the message to maintainers — it identifies the non-conforming provider"],"exampleFix":"// before\nprovider := myMinimalProvider{}        // lacks Importer()\nuowProvider = provider\n// after\nprovider := publicops.NewUOWProvider() // implements uow.ImporterSource\nuowProvider = provider","handlingStrategy":"fallback","validationCode":"bd --version   # ensure server and client versions match\nbd import --help >/dev/null   # binary actually has the import surface","typeGuard":null,"tryCatchPattern":"if ! bd import data.jsonl 2>err.log; then\n  grep 'does not offer the import surface' err.log && bd import data.jsonl   # after unsetting proxied-server routing\nfi","preventionTips":["Keep bd binaries and plugins on matching versions","Avoid custom uowProvider implementations in tests/stubs that drop interfaces","Only enable proxied-server mode when the backend supports all surfaces you use","Capture the %T type from the error message when reporting the bug"],"tags":["proxied-server","wiring","type-assertion"],"backgroundTag":"interface-not-implemented","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}