{"record":{"id":"00883e3035c908de","repo":"gastownhall/beads","slug":"graph-create-w","errorCode":null,"errorMessage":"graph create: %w","messagePattern":"graph create: %w","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/create_proxied_server.go","lineNumber":356,"sourceCode":"\n\t\t// validateProxiedGraphPlan enforces a uniform storage class, so its\n\t\t// resolved useWisp decides which table the whole plan routes to. The\n\t\t// collision preflight runs inside this transaction, so it cannot race\n\t\t// a concurrent create of the same explicit ID.\n\t\tuseWisp, err := validateProxiedGraphPlan(&plan, in, cctx, uowIssueExists(ctx, uw))\n\t\tif err != nil {\n\t\t\treturn nil, \"\", fmt.Errorf(\"invalid graph plan: %w\", err)\n\t\t}\n\n\t\tvar result domain.GraphApplyResult\n\t\tvar applyErr error\n\t\tif useWisp {\n\t\t\tresult, applyErr = uw.IssueUseCase().ApplyWispGraph(ctx, domainPlan, in.createdBy)\n\t\t} else {\n\t\t\tresult, applyErr = uw.IssueUseCase().ApplyIssueGraph(ctx, domainPlan, in.createdBy)\n\t\t}\n\t\tif applyErr != nil {\n\t\t\treturn nil, \"\", fmt.Errorf(\"graph create: %w\", applyErr)\n\t\t}\n\n\t\treturn result.IDs, commitMsg, nil\n\t})\n\tif err != nil {\n\t\treturn HandleError(\"%v\", err)\n\t}\n\n\tif in.jsonOutput {\n\t\tif err := outputJSON(GraphApplyResult{IDs: res}); err != nil {\n\t\t\tfmt.Fprintf(os.Stderr, \"Error: %v\\n\", err)\n\t\t}\n\t\treturn nil\n\t}\n\n\tfmt.Printf(\"Created %d issues\\n\", len(res))\n\tkeys := make([]string, 0, len(res))\n\tfor k := range res {","sourceCodeStart":338,"sourceCodeEnd":374,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/create_proxied_server.go#L338-L374","documentation":"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.","triggerScenarios":"runCreateProxiedGraph: validateProxiedGraphPlan passed but the IssueUseCase graph apply errors — storage write failure, constraint violation racing a concurrent create, or use-case-level invariant failure.","commonSituations":"Concurrent process created the same explicit ID between preflight and apply; Dolt storage error mid-transaction; oversized plan hitting limits.","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"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"if err := runCreateProxiedGraph(cmd, ctx, in); err != nil && strings.Contains(err.Error(), \"graph create\") {\n    time.Sleep(time.Second)\n    return runCreateProxiedGraph(cmd, ctx, in) // tx rolled back; safe to retry\n}","preventionTips":["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"],"tags":["graph-apply","transaction","proxied-server","storage"],"backgroundTag":"graph-create-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}