gastownhall/beads · error
failed to set routing contributor path: %w
Error message
failed to set routing contributor path: %w
What it means
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.
Source
Thrown at cmd/bd/init_contributor.go:213
cmd = exec.Command("git", "commit", "-m", "Initial commit: beads planning repository")
cmd.Dir = planningPath
_ = cmd.Run()
fmt.Printf("%s Planning repository created\n", ui.RenderPass("✓"))
} else {
fmt.Printf("%s Using existing planning repository\n", ui.RenderPass("✓"))
}
// Step 4: Configure contributor routing
fmt.Printf("\n%s Configuring contributor auto-routing...\n", ui.RenderAccent("▶"))
// Set routing config (canonical namespace per internal/config/config.go)
if err := store.SetConfig(ctx, "routing.mode", "auto"); err != nil {
return fmt.Errorf("failed to set routing mode: %w", err)
}
if err := store.SetConfig(ctx, "routing.contributor", planningPath); err != nil {
return fmt.Errorf("failed to set routing contributor path: %w", err)
}
fmt.Printf("%s Auto-routing enabled\n", ui.RenderPass("✓"))
// Step 4b: Enable multi-repo hydration so routed issues are visible (bd-fix-routing)
fmt.Printf("\n%s Configuring multi-repo hydration...\n", ui.RenderAccent("▶"))
// Find config.yaml path
configPath, err := config.FindConfigYAMLPath()
if err != nil {
return fmt.Errorf("failed to find config.yaml: %w", err)
}
// Add planning repo to repos.additional for hydration
if err := config.AddRepo(configPath, planningPath); err != nil {
// Check if already added (non-fatal)
if !strings.Contains(err.Error(), "already exists") {
return fmt.Errorf("failed to configure hydration: %w", err)View on GitHub (pinned to 71377f2769)
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
Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-check that the config store is openable before configuring routing
if err := store.SetConfig(ctx, "routing.mode", "off"); err != nil {
return fmt.Errorf("config store not writable, fix before contributor setup: %w", err)
} Try / catch
if err := runContributorWizard(ctx, store, ...); err != nil {
if strings.Contains(err.Error(), "failed to set routing contributor path") {
fmt.Fprintln(os.Stderr, "storage failure while writing config; check .beads store and Dolt server")
}
return err
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- failed to set routing mode: %w
- database config fix not applicable for Dolt backend (data is
- failed to find config.yaml: %w
- failed to configure hydration: %w
- failed to set sync remote: %w
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/941eb22b22639310.
Report an issue: GitHub.