gastownhall/beads · error
pouring proto: %w
Error message
pouring proto: %w
What it means
Wrapped error from cloneSubgraphInto during `bd mol pour`. The proto resolved, validated, and passed dry-run checks, but actually cloning the template subgraph into new issues (prefix bd-mol) failed inside the pour transaction. The whole transaction rolls back, so no partial molecule is left behind.
Source
Thrown at cmd/bd/mol_proxied_server.go:127
}
if in.dryRun {
var previews []pourAttachPreview
for _, a := range attachments {
previews = append(previews, pourAttachPreview{title: a.issue.Title, steps: len(a.subgraph.Issues)})
}
renderPourDryRun(protoID, subgraph, vars, in.assignee, in.attachType, previews)
return pourProxiedResult{}, "", nil
}
spawnResult, err := cloneSubgraphInto(ctx, w, subgraph, CloneOptions{
Vars: vars,
Assignee: in.assignee,
Actor: actor,
Prefix: types.IDPrefixMol,
})
if err != nil {
return pourProxiedResult{}, "", fmt.Errorf("pouring proto: %w", err)
}
totalAttached := 0
if len(attachments) > 0 {
spawnedMol, err := w.GetIssue(ctx, spawnResult.NewEpicID)
if err != nil {
return pourProxiedResult{}, "", fmt.Errorf("loading spawned mol: %w", err)
}
for _, attach := range attachments {
bondResult, err := bondProtoMolAttachInto(ctx, w, attach.subgraph, attach.issue, spawnedMol, in.attachType, vars, "", actor, false, true)
if err != nil {
return pourProxiedResult{}, "", fmt.Errorf("attaching %s: %w", attach.id, err)
}
totalAttached += bondResult.Spawned
}
}
return pourProxiedResult{spawn: spawnResult, totalAttached: totalAttached, attachCount: len(attachments)},View on GitHub (pinned to 71377f2769)
Solutions
- Read the wrapped inner error to identify the failing insert/update and fix that cause
- Verify the database is writable and not locked (close other `bd` processes, check disk space)
- Retry the pour — the transaction is atomic, so a transient failure leaves no partial state
- If variable substitution produced invalid fields, re-run with corrected --var values
Defensive patterns
Strategy: retry
Validate before calling
// Confirm writable, unlocked storage before pouring bd ready 2>&1 && df -h .beads
Try / catch
err := runPourProxiedServer(ctx, in)
if err != nil && isTransientStorageError(errors.Unwrap(err)) {
time.Sleep(backoff)
err = runPourProxiedServer(ctx, in) // safe: pour is transactional
} Prevention
- Avoid running concurrent `bd` writes while pouring
- Monitor disk space and database health (`bd doctor`) on CI runners
- Test --var values with --dry-run before real pours to avoid invalid interpolated fields
When it happens
Trigger: Any `bd mol pour <proto>` where the clone step fails: ID generation collision, storage write error, constraint violation when inserting cloned issues, or failure creating dependency edges among cloned children.
Common situations: Database locked or connection dropped mid-transaction; read-only or full storage; duplicated molecule ID prefix exhaustion; a bug in variable substitution producing invalid issue fields (empty title after interpolation).
Related errors
- loading attachment subgraph %s: %w
- loading spawned mol: %w
- loading proto %s: %w
- loading proto: %w
- loading attachment %s: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/49783261b43d763a.
Report an issue: GitHub.