{"record":{"id":"941eb22b22639310","repo":"gastownhall/beads","slug":"failed-to-set-routing-contributor-path-w","errorCode":null,"errorMessage":"failed to set routing contributor path: %w","messagePattern":"failed to set routing contributor path: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/bd/init_contributor.go","lineNumber":213,"sourceCode":"\n\t\tcmd = exec.Command(\"git\", \"commit\", \"-m\", \"Initial commit: beads planning repository\")\n\t\tcmd.Dir = planningPath\n\t\t_ = cmd.Run()\n\n\t\tfmt.Printf(\"%s Planning repository created\\n\", ui.RenderPass(\"✓\"))\n\t} else {\n\t\tfmt.Printf(\"%s Using existing planning repository\\n\", ui.RenderPass(\"✓\"))\n\t}\n\n\t// Step 4: Configure contributor routing\n\tfmt.Printf(\"\\n%s Configuring contributor auto-routing...\\n\", ui.RenderAccent(\"▶\"))\n\n\t// Set routing config (canonical namespace per internal/config/config.go)\n\tif err := store.SetConfig(ctx, \"routing.mode\", \"auto\"); err != nil {\n\t\treturn fmt.Errorf(\"failed to set routing mode: %w\", err)\n\t}\n\tif err := store.SetConfig(ctx, \"routing.contributor\", planningPath); err != nil {\n\t\treturn fmt.Errorf(\"failed to set routing contributor path: %w\", err)\n\t}\n\n\tfmt.Printf(\"%s Auto-routing enabled\\n\", ui.RenderPass(\"✓\"))\n\n\t// Step 4b: Enable multi-repo hydration so routed issues are visible (bd-fix-routing)\n\tfmt.Printf(\"\\n%s Configuring multi-repo hydration...\\n\", ui.RenderAccent(\"▶\"))\n\n\t// Find config.yaml path\n\tconfigPath, err := config.FindConfigYAMLPath()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to find config.yaml: %w\", err)\n\t}\n\n\t// Add planning repo to repos.additional for hydration\n\tif err := config.AddRepo(configPath, planningPath); err != nil {\n\t\t// Check if already added (non-fatal)\n\t\tif !strings.Contains(err.Error(), \"already exists\") {\n\t\t\treturn fmt.Errorf(\"failed to configure hydration: %w\", err)","sourceCodeStart":195,"sourceCodeEnd":231,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/cmd/bd/init_contributor.go#L195-L231","documentation":"Wraps an error from store.SetConfig when writing the 'routing.contributor' key (the planning repo path) during the contributor wizard. Same mechanism as the routing.mode failure: the beads config store failed to persist the value, aborting setup. The wrapped error names the underlying storage problem.","triggerScenarios":"store.SetConfig(ctx, \"routing.contributor\", planningPath) returns an error inside runContributorWizard — same storage failures as the routing.mode write: locked/corrupt/missing Dolt store, server unreachable.","commonSituations":"Same as routing.mode failure: broken .beads store, concurrent bd process holding a lock, no Dolt server for server-mode builds, permission or disk issues.","solutions":["Inspect the wrapped cause and fix the underlying store error","Run bd doctor or bd init to verify/repair the .beads Dolt store","Ensure the Dolt server is running if the build requires server mode","Check permissions on the .beads directory"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Pre-check that the config store is openable before configuring routing\nif err := store.SetConfig(ctx, \"routing.mode\", \"off\"); err != nil {\n\treturn fmt.Errorf(\"config store not writable, fix before contributor setup: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"if err := runContributorWizard(ctx, store, ...); err != nil {\n\tif strings.Contains(err.Error(), \"failed to set routing contributor path\") {\n\t\tfmt.Fprintln(os.Stderr, \"storage failure while writing config; check .beads store and Dolt server\")\n\t}\n\treturn err\n}","preventionTips":["Keep the .beads directory free of locks (no parallel bd runs)","Verify store health with bd doctor before reconfiguring","Maintain free disk space and correct ownership of .beads"],"tags":["go","config","dolt","cli-setup"],"backgroundTag":"config-store-write-failed","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}