gastownhall/beads · error

invalid bond type '%s', must be: sequential, parallel, or co

Error message

invalid bond type '%s', must be: sequential, parallel, or conditional

What it means

bd mol bond validates the bond type against the known set (sequential, parallel, conditional); any other value is rejected with this error listing the valid options.

Source

Thrown at cmd/bd/mol_bond.go:190

	ephemeral   bool
	pour        bool
	childRef    string
}

func gatherMolBondInput(cmd *cobra.Command, args []string) (molBondInput, error) {
	in := molBondInput{argA: args[0], argB: args[1]}
	in.bondType, _ = cmd.Flags().GetString("type")
	in.customTitle, _ = cmd.Flags().GetString("as")
	in.dryRun, _ = cmd.Flags().GetBool("dry-run")
	in.ephemeral, _ = cmd.Flags().GetBool("ephemeral")
	in.pour, _ = cmd.Flags().GetBool("pour")
	in.childRef, _ = cmd.Flags().GetString("ref")

	if in.ephemeral && in.pour {
		return in, fmt.Errorf("cannot use both --ephemeral and --pour")
	}
	if in.bondType != types.BondTypeSequential && in.bondType != types.BondTypeParallel && in.bondType != types.BondTypeConditional {
		return in, fmt.Errorf("invalid bond type '%s', must be: sequential, parallel, or conditional", in.bondType)
	}

	varFlags, _ := cmd.Flags().GetStringArray("var")
	vars, err := parseVarFlags(varFlags)
	if err != nil {
		return in, err
	}
	in.vars = vars
	return in, nil
}

func renderMolBondDryRun(in molBondInput, issueA *types.Issue, formulaA string, issueB *types.Issue, formulaB string) {
	idA := in.argA
	idB := in.argB
	aIsProto := false
	bIsProto := false

	if issueA != nil {

View on GitHub (pinned to 71377f2769)

Solutions

  1. Use exactly one of: sequential, parallel, conditional (lowercase).
  2. Check spelling of the --type value in scripts/aliases.
  3. Run `bd mol bond --help` to see the accepted values for your installed bd version.

Example fix

// before
bd mol bond --type seq ... 
// after
bd mol bond --type sequential ...
Defensive patterns

Strategy: validation

Validate before calling

case "$BOND_TYPE" in
  sequential|parallel|conditional) ;;
  *) echo "invalid bond type: $BOND_TYPE"; exit 1 ;;
esac

Prevention

When it happens

Trigger: `bd mol bond --type <value>` with a misspelled or unsupported type, e.g. --type seq, --type ordered, or empty string.

Common situations: Typo in a script, or copying a bond type name from an older/other tool version that used different vocabulary.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


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