{"record":{"id":"49eb35bfa3ab7671","repo":"gastownhall/beads","slug":"proxied-server-provider-t-does-not-offer-the-batc","errorCode":null,"errorMessage":"proxied-server provider %T does not offer the batch-close surface","messagePattern":"proxied-server provider %T does not offer the batch-close surface","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/close_proxied_server.go","lineNumber":217,"sourceCode":"\tif in.session == \"\" {\n\t\tin.session = os.Getenv(\"CLAUDE_SESSION_ID\")\n\t}\n\tin.jsonOut, _ = cmd.Flags().GetBool(\"json\")\n\treturn in\n}\n\n// proxiedBatchCloser hands back the guarded close-many surface for the\n// proxied-server provider, through the provider's OWN capability accessor —\n// the same two-step proxiedIssueReader performs, and for the same reason: the\n// accessor is where each layer is added, so a command that reached for the\n// constructor would get an unlayered closer.\nfunc proxiedBatchCloser() (issueops.BatchCloser, error) {\n\tif uowProvider == nil {\n\t\treturn nil, errors.New(\"proxied-server UOW provider not initialized\")\n\t}\n\tsrc, ok := uowProvider.(uow.BatchCloserSource)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"proxied-server provider %T does not offer the batch-close surface\", uowProvider)\n\t}\n\treturn src.BatchCloser()\n}\n\n// closeProxiedRunPreflight resolves every argument and applies the CLI's own\n// close policy to it, in one read-only unit of work.\nfunc closeProxiedRunPreflight(ctx context.Context, args, reasons []string, in closeProxiedInput) (closeProxiedPreflight, error) {\n\tpre := closeProxiedPreflight{\n\t\terrors: make([]string, len(args)),\n\t\tbefore: make(map[string]*types.Issue, len(args)),\n\t}\n\t_, err := uow.RunTxRead(ctx, uowProvider, func(ctx context.Context, uw uow.UnitOfWork) (struct{}, error) {\n\t\tfor i, id := range args {\n\t\t\trefusal, current := closeProxiedCheckOne(ctx, uw, id, in)\n\t\t\tif refusal != \"\" {\n\t\t\t\tpre.errors[i] = refusal\n\t\t\t\tcontinue\n\t\t\t}","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/close_proxied_server.go#L199-L235","documentation":"A capability-mismatch guard in proxied-server mode: the injected unit-of-work provider does not implement `uow.BatchCloserSource`, so no batch-closer surface can be obtained. This indicates a wiring/version mismatch between the CLI command and the provider that the server assembled.","triggerScenarios":"Running a batch close through the proxied-server path when the configured uowProvider is a narrower provider type lacking BatchCloser() — typically a stale binary, mixed-version server/client, or custom provider that only implements a subset of sources.","commonSituations":"Server and `bd` CLI built from different commits; a plugin/custom provider compiled against an older interface that predates the batch-close surface.","solutions":["Rebuild the bd binary and the proxied server from the same commit so interfaces match","Check the provider type reported in the message (%T) against uow.BatchCloserSource and update the provider to implement it","Pin client and server to the same version in your deployment","Fall back to non-proxied close (run close locally against the store) if the server cannot be upgraded"],"exampleFix":"// before\nsrc, ok := uowProvider.(uow.BatchCloserSource) // ok == false\n// after\n// implement the surface on the provider:\nfunc (p *MyProvider) BatchCloser() (issueops.BatchCloser, error) { ... }","handlingStrategy":"type-guard","validationCode":"// ensure client/server parity\nbd --version  # compare with server version before proxied ops","typeGuard":"// check the surface before relying on proxied batch close\nif _, ok := provider.(uow.BatchCloserSource); !ok {\n    // fall back to local close\n}","tryCatchPattern":"if err := runClose(); strings.Contains(err.Error(), \"does not offer the batch-close surface\") {\n    // rebuild/upgrade server, or close locally\n}","preventionTips":["Deploy CLI and proxied server from the same build","Restart the server after every bd upgrade","Keep custom providers implementing all uow source interfaces","Add a smoke test exercising proxied batch close in CI"],"tags":["proxied-server","interface-mismatch","batch-close"],"backgroundTag":"interface-not-implemented","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}