gastownhall/beads · error

proxied-server provider %T does not offer the batch-create s

Error message

proxied-server provider %T does not offer the batch-create surface

What it means

proxiedBatchCreator checks that the proxied-server UOW provider implements uow.BatchCreatorSource; if the concrete provider type lacks BatchCreator(), creation fails fast with the provider's dynamic type in the message. This is a capability/wiring mismatch, not user input.

Source

Thrown at cmd/bd/create_proxied_server.go:277

	if err != nil {
		return HandleError("%v", err)
	}
	result, err := creator.CreateBatch(ctx, request)
	if err != nil {
		return HandleError("creating issues from markdown: %v", err)
	}
	return reportMarkdownBatch(result.Issues, in)
}

// proxiedBatchCreator reaches the batch-create role through the provider's own
// capability accessor, which is where each decorator adds its layer.
func proxiedBatchCreator() (issueops.BatchCreator, error) {
	if uowProvider == nil {
		return nil, errors.New("proxied-server UOW provider not initialized")
	}
	src, ok := uowProvider.(uow.BatchCreatorSource)
	if !ok {
		return nil, fmt.Errorf("proxied-server provider %T does not offer the batch-create surface", uowProvider)
	}
	return src.BatchCreator()
}

func runCreateProxiedGraph(_ *cobra.Command, ctx context.Context, in createInput) error {
	data, err := os.ReadFile(in.graphFile) // #nosec G304 -- user-provided path is intentional
	if err != nil {
		return HandleError("reading graph plan: %v", err)
	}
	if unknown := detectUnknownGraphFields(data); len(unknown) > 0 {
		warnUnknownGraphFields(os.Stderr, unknown)
	}

	var plan GraphApplyPlan
	if err := json.Unmarshal(data, &plan); err != nil {
		return HandleError("parsing graph plan: %v", err)
	}

View on GitHub (pinned to 71377f2769)

Solutions

  1. Update client and server to matching versions
  2. Check which provider type is wired into uowProvider (shown in %T)
  3. Use the non-batch proxied create path if the provider is older
  4. Fix the provider implementation to expose BatchCreator()

Example fix

// before: provider missing the surface
uowProvider = legacyProvider{} // no BatchCreator()
// after: wire a provider implementing uow.BatchCreatorSource
uowProvider = newBatchCapableProvider()
Defensive patterns

Strategy: type-guard

Type guard

src, ok := uowProvider.(uow.BatchCreatorSource)
if !ok {
    return fmt.Errorf("provider %T lacks batch-create; falling back", uowProvider)
}

Try / catch

bc, err := proxiedBatchCreator()
if err != nil {
    // fall back to per-issue proxied create instead of failing hard
    return runProxiedCreateOneByOne(ctx, in)
}

Prevention

When it happens

Trigger: runCreateProxiedMarkdown calls proxiedBatchCreator while uowProvider is wired to a provider type that does not implement uow.BatchCreatorSource (and uowProvider is non-nil, or the nil case surfaced earlier).

Common situations: Version skew between the bd client and server (older provider without batch-create); custom or mock provider injected in tests; build with mismatched internal interfaces.

Related errors


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