gastownhall/beads · error
creating compound: %w
Error message
creating compound: %w
What it means
bondProtoProtoInto creates the compound issue via w.CreateIssue; if the write fails the bonding operation aborts with this wrapped error, before any dependencies are linked.
Source
Thrown at cmd/bd/mol_bond.go:339
// rather than in a write of its own: a create decides which table the row
// goes to, and carrying the labels with it means one decision places both.
// The separate write this replaces was made through molWriter.AddLabel,
// whose two implementations each resolved the plane again by a different
// predicate, so the row and its label were free to disagree.
compound := &types.Issue{
Title: compoundTitle,
Description: fmt.Sprintf("Compound proto bonding %s and %s", protoA.ID, protoB.ID),
Status: types.StatusOpen,
Priority: minPriority(protoA.Priority, protoB.Priority),
IssueType: types.TypeEpic,
Labels: []string{MoleculeLabel},
BondedFrom: []types.BondRef{
{SourceID: protoA.ID, BondType: bondType, BondPoint: ""},
{SourceID: protoB.ID, BondType: bondType, BondPoint: ""},
},
}
if err := w.CreateIssue(ctx, compound, actorName); err != nil {
return nil, fmt.Errorf("creating compound: %w", err)
}
compoundID := compound.ID
// Add parent-child dependencies from compound to both proto roots
depA := &types.Dependency{
IssueID: protoA.ID,
DependsOnID: compoundID,
Type: types.DepParentChild,
}
if err := w.AddDependency(ctx, depA, actorName); err != nil {
return nil, fmt.Errorf("linking proto A: %w", err)
}
depB := &types.Dependency{
IssueID: protoB.ID,
DependsOnID: compoundID,
Type: types.DepParentChild,
}View on GitHub (pinned to 71377f2769)
Solutions
- Read the wrapped inner error for the driver-level cause.
- Ensure no other bd process holds the DB lock; retry the bond command.
- Check disk space/permissions on the .beads storage, then re-run.
Defensive patterns
Strategy: try-catch
Validate before calling
// pre-check storage writable/lock-free
if err := w.CreateIssue(ctx, probe, actorName); err != nil && !errors.Is(err, someExpected) { /* fail fast */ } Try / catch
compound, err := bondProtoProtoInto(ctx, w, protoA, protoB, bt, actor)
if err != nil {
if strings.Contains(err.Error(), "creating compound:") {
// storage write failed; check locks/disk and retry
}
return err
} Prevention
- Run bonds when no other bd process holds the DB lock.
- Ensure sufficient disk space and write permissions on .beads storage.
- Retry after fixing storage; check for a partially created compound first.
When it happens
Trigger: w.CreateIssue(ctx, compound, actorName) errors during `bd mol bond` of two protos — destination DB lock, ID collision, or driver write failure.
Common situations: Another bd process holds the database lock, or storage is read-only/full while a bond automation runs.
Related errors
- linking proto A: %w
- ErrExec
- database not available: %w
- not using Dolt backend (configured backend %q)
- no storage backend is open
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/3ad934e9eaef5ca2.
Report an issue: GitHub.