gastownhall/beads · error
graph create: %w
Error message
graph create: %w
What it means
The graph apply itself failed inside the transaction: ApplyWispGraph or ApplyIssueGraph returned an error after validation passed. The transaction rolls back, so no nodes from the plan were created.
Source
Thrown at cmd/bd/create_proxied_server.go:356
// validateProxiedGraphPlan enforces a uniform storage class, so its
// resolved useWisp decides which table the whole plan routes to. The
// collision preflight runs inside this transaction, so it cannot race
// a concurrent create of the same explicit ID.
useWisp, err := validateProxiedGraphPlan(&plan, in, cctx, uowIssueExists(ctx, uw))
if err != nil {
return nil, "", fmt.Errorf("invalid graph plan: %w", err)
}
var result domain.GraphApplyResult
var applyErr error
if useWisp {
result, applyErr = uw.IssueUseCase().ApplyWispGraph(ctx, domainPlan, in.createdBy)
} else {
result, applyErr = uw.IssueUseCase().ApplyIssueGraph(ctx, domainPlan, in.createdBy)
}
if applyErr != nil {
return nil, "", fmt.Errorf("graph create: %w", applyErr)
}
return result.IDs, commitMsg, nil
})
if err != nil {
return HandleError("%v", err)
}
if in.jsonOutput {
if err := outputJSON(GraphApplyResult{IDs: res}); err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
}
return nil
}
fmt.Printf("Created %d issues\n", len(res))
keys := make([]string, 0, len(res))
for k := range res {View on GitHub (pinned to 71377f2769)
Solutions
- Read the wrapped applyErr for the storage-level cause
- Retry — a race on the collision preflight resolves if the other create finishes
- Re-run with a smaller plan to isolate the failing node
- Check server storage health if errors persist
Defensive patterns
Strategy: retry
Try / catch
if err := runCreateProxiedGraph(cmd, ctx, in); err != nil && strings.Contains(err.Error(), "graph create") {
time.Sleep(time.Second)
return runCreateProxiedGraph(cmd, ctx, in) // tx rolled back; safe to retry
} Prevention
- Avoid concurrent processes creating the same explicit IDs
- Break very large plans into smaller batches
- Retry transient storage failures — the transaction guarantees no partial state
When it happens
Trigger: runCreateProxiedGraph: validateProxiedGraphPlan passed but the IssueUseCase graph apply errors — storage write failure, constraint violation racing a concurrent create, or use-case-level invariant failure.
Common situations: Concurrent process created the same explicit ID between preflight and apply; Dolt storage error mid-transaction; oversized plan hitting limits.
Related errors
- load create context: %w
- batch create: %w
- node %q: updating metadata refs: %w
- invalid graph plan: %w
- reading gate %s: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/00883e3035c908de.
Report an issue: GitHub.