gastownhall/beads · error

%s not found as formula or proto ID

Error message

%s not found as formula or proto ID

What it means

bd mol pour first tries to interpret the argument as a formula name; if that fails, it falls back to resolving the argument as a proto (template molecule) ID via ResolvePartialID. This error fires only when BOTH interpretations fail: the argument is neither a recognized formula nor resolvable to an existing issue ID. Note the original ResolvePartialID error is discarded, so the message alone doesn't say why resolution failed.

Source

Thrown at cmd/bd/mol_proxied_server.go:60

			warnPourVaporFormula(in.protoArg, in.varFlags)
		}
	} else if errors.Is(err, formula.ErrVarValidation) {
		// in.protoArg IS a formula; the --var values it was given fail
		// enum/pattern/required-empty constraints. Report that directly
		// instead of falling through to the proto-ID lookup below, which
		// would otherwise mask this as "not found as formula or proto ID".
		return HandleError("%v", err)
	}

	res, err := uow.RunTxResult(ctx, uowProvider, func(ctx context.Context, uw uow.UnitOfWork) (pourProxiedResult, string, error) {
		w := newUOWMolWriter(uw)

		subgraph := formulaSubgraph
		protoID := formulaProtoID
		if subgraph == nil {
			resolvedID, err := utils.ResolvePartialID(ctx, w, in.protoArg)
			if err != nil {
				return pourProxiedResult{}, "", fmt.Errorf("%s not found as formula or proto ID", in.protoArg)
			}
			protoID = resolvedID
			protoIssue, err := w.GetIssue(ctx, protoID)
			if err != nil {
				return pourProxiedResult{}, "", fmt.Errorf("loading proto %s: %w", protoID, err)
			}
			if !isProto(protoIssue) {
				return pourProxiedResult{}, "", fmt.Errorf("%s is not a proto (missing '%s' label)", protoID, MoleculeLabel)
			}
			subgraph, err = loadTemplateSubgraph(ctx, w, protoID)
			if err != nil {
				return pourProxiedResult{}, "", fmt.Errorf("loading proto: %w", err)
			}
		}

		type attachmentInfo struct {
			id       string
			issue    *types.Issue

View on GitHub (pinned to 71377f2769)

Solutions

  1. Run bd mol list (or bd list) to see available formulas and protos and copy the exact name/ID
  2. Check spelling of the formula name — try the formula path first in isolation
  3. Ensure you are in the repository with the database containing the proto (bd show <id>)
  4. If the proto lives in another synced repo, run bd dolt pull / sync before pouring

Example fix

// before
$ bd mol pour mol-fx
Error: mol-fx not found as formula or proto ID
// after
$ bd mol list            # find exact name
$ bd mol pour mol-fix
Defensive patterns

Strategy: validation

Validate before calling

// resolve the argument before pouring
resolved, err := utils.ResolvePartialID(ctx, reader, protoArg)
if err != nil {
	return fmt.Errorf("%q is not a formula or a known issue ID; see `bd mol list`", protoArg)
}

Try / catch

err := pourCmd(protoArg)
if err != nil && strings.Contains(err.Error(), "not found as formula or proto ID") {
	return fmt.Errorf("check spelling of %q or run `bd mol list`", protoArg)
}

Prevention

When it happens

Trigger: Running `bd mol pour <arg>` where <arg> is a typo'd formula name, a partial ID that doesn't match any issue, or an ID in a database that doesn't contain it.

Common situations: Typo in formula name (e.g. 'mol-fix' vs 'fix-mol'); passing a full human title instead of an ID; running in the wrong repo so the proto doesn't exist locally; referencing a proto deleted by bd gc or a sync that hasn't pulled it yet.

Related errors


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