gastownhall/beads · error
load create context: %w
Error message
load create context: %w
What it means
Inside the graph-apply transaction, LoadCreateContext on the config use case failed (actor/defaults/resolution context for creates could not be loaded). The whole uow.RunTxResult transaction aborts and nothing from the plan is written.
Source
Thrown at cmd/bd/create_proxied_server.go:336
return HandleError("%v", err)
}
return nil
}
domainPlan, err := buildDomainGraphPlan(plan, in)
if err != nil {
return err
}
commitMsg := plan.CommitMessage
if commitMsg == "" {
commitMsg = fmt.Sprintf("bd: graph-apply %d nodes", len(plan.Nodes))
}
res, err := uow.RunTxResult(ctx, uowProvider, func(ctx context.Context, uw uow.UnitOfWork) (map[string]string, string, error) {
cctx, err := uw.ConfigUseCase().LoadCreateContext(ctx)
if err != nil {
return nil, "", fmt.Errorf("load create context: %w", err)
}
// 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)
}View on GitHub (pinned to 71377f2769)
Solutions
- Read the wrapped error for the config-layer cause
- Validate server config (default issue type, priority) is set and well-formed
- Check proxied-server connectivity and storage health (`bd doctor`)
- Retry once config is repaired; the tx is atomic so no partial writes
Defensive patterns
Strategy: try-catch
Validate before calling
// preflight: ensure server config defaults are reachable
if _, err := configClient.GetDefaultIssueType(ctx); err != nil {
return fmt.Errorf("server config unavailable before graph apply: %w", err)
} Try / catch
err := uow.RunTxResult(ctx, uowProvider, fn)
if err != nil && strings.Contains(err.Error(), "load create context") {
// transaction rolled back atomically; safe to retry after fixing config
return repairServerConfigAndRetry(ctx, in)
} Prevention
- Verify server config (default type/priority) is set before bulk applies
- Monitor server storage health
- Remember the tx is atomic — no partial graph writes to clean up
When it happens
Trigger: runCreateProxiedGraph / graph-apply against the proxied server when uw.ConfigUseCase().LoadCreateContext errors — e.g. server-side config unavailable, bad default-issue-type/priority config, or storage error inside the tx.
Common situations: Server config DB unreachable or corrupt; malformed default-priority/issue-type config values; permission errors reading config through the proxy.
Related errors
- graph create: %w
- invalid graph plan: %w
- batch create: %w
- node %q: updating metadata refs: %w
- ensureProxiedServerConfig: custom config %s: not a regular f
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/39b17777312fecdf.
Report an issue: GitHub.