{"record":{"id":"e4642f565309b1d6","repo":"gastownhall/beads","slug":"running-team-wizard-v","errorCode":null,"errorMessage":"running team wizard: %v","messagePattern":"running team wizard: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/init.go","lineNumber":1904,"sourceCode":"\t\t\tif isGitRepo() {\n\t\t\t\tif err := setBeadsRole(\"contributor\"); err != nil && !quiet {\n\t\t\t\t\tfmt.Fprintf(os.Stderr, \"Warning: failed to set beads.role=contributor: %v\\n\", err)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Run team wizard if --team flag is set\n\t\tif team {\n\t\t\tif err := runTeamWizard(ctx, store); err != nil {\n\t\t\t\tcanceled := isCanceled(err)\n\t\t\t\tif canceled {\n\t\t\t\t\tfmt.Fprintln(os.Stderr, \"Setup canceled.\")\n\t\t\t\t}\n\t\t\t\t_ = store.Close()\n\t\t\t\tif canceled {\n\t\t\t\t\treturn errCanceled()\n\t\t\t\t}\n\t\t\t\treturn fmt.Errorf(\"running team wizard: %v\", err)\n\t\t\t}\n\t\t}\n\n\t\t// Safety net: ensure beads.role is always set when in a git repo (GH#2950).\n\t\t// Earlier code paths may skip role-setting when BEADS_DIR is set,\n\t\t// promptContributorMode fails, or edge-case flag combinations are used.\n\t\t// This guarantees every init leaves a usable role-configured state.\n\t\tif isGitRepo() {\n\t\t\tif _, hasRole := getBeadsRole(); !hasRole {\n\t\t\t\tfallbackRole := \"maintainer\"\n\t\t\t\tif roleFlag != \"\" {\n\t\t\t\t\tfallbackRole = roleFlag\n\t\t\t\t}\n\t\t\t\tif err := setBeadsRole(fallbackRole); err != nil && !quiet {\n\t\t\t\t\tfmt.Fprintf(os.Stderr, \"Warning: failed to set beads.role=%s: %v\\n\", fallbackRole, err)\n\t\t\t\t}\n\t\t\t}\n\t\t}","sourceCodeStart":1886,"sourceCodeEnd":1922,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/init.go#L1886-L1922","documentation":"In team mode, `bd init` runs the team setup wizard to configure a team workspace (remote provisioning, sync settings). If it fails with a non-cancellation error, bd closes the store and wraps it with this message; user cancellation is reported as errCanceled.","triggerScenarios":"The team wizard is invoked during `bd init` and returns err with canceled == false.","commonSituations":"Non-interactive environment without a TTY, network failure reaching the team remote/shared Dolt server, missing authentication credentials, or the user skipping a required provisioning step that later fails.","solutions":["Re-run bd init in an interactive terminal","Inspect the wrapped %v error and fix the failing step (network, auth, remote URL)","Verify the shared server / remote is reachable before init (curl/ping the endpoint)","Pre-configure sync settings manually and skip the wizard if automation is required"],"exampleFix":"// before (fails: server unreachable)\n$ bd init --team\n// after\n$ dolt sql-server &   # ensure team server reachable\n$ bd init --team","handlingStrategy":"try-catch","validationCode":"[ -t 0 ] || echo \"no TTY — team wizard needs an interactive terminal\"\ncurl -sf \"$TEAM_SERVER_URL\" >/dev/null || echo \"team server unreachable\"","typeGuard":null,"tryCatchPattern":"if ! bd init --team; then\n  echo \"team wizard failed — verify network/auth, then retry\"\nfi","preventionTips":["Ensure the team/shared Dolt server is reachable before init","Have credentials ready (auth tokens, SSH) before running the wizard","Run interactively; for CI, pre-seed config and skip the wizard","Check the wrapped error text for the exact failing wizard step"],"tags":["init","wizard","team","setup"],"backgroundTag":"setup-wizard-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}