gastownhall/beads · error
no absolute native user directory is available
Error message
no absolute native user directory is available
What it means
validatePublicCreateDependencies rejects a dependency whose TargetID exceeds the allowed field length (types.CheckFieldLen("dependency target ID", ...)). The index of the offending dependency is included so batch callers can locate it. It is wrapped as ErrValidation like all public-create refusals.
Source
Thrown at internal/config/user_config_path.go:86
}
func selectUserConfigYamlPath(candidates userConfigYamlCandidates) (string, error) {
if userConfigPathExists(candidates.documented) {
return candidates.documented, nil
}
if candidates.native != candidates.documented && userConfigPathExists(candidates.native) {
return candidates.native, nil
}
if candidates.documented != "" {
return candidates.documented, nil
}
if candidates.native != "" {
return candidates.native, nil
}
err := errors.Join(candidates.homeErr, candidates.nativeErr)
if err == nil {
err = errors.New("no absolute native user directory is available")
}
return "", fmt.Errorf("resolve user config.yaml: %w", err)
}
// UserConfigYamlDisplayPath returns a human-readable location for command
// output. The tilde form is deliberately confined to this display-only API and
// must never be passed to a filesystem operation.
func UserConfigYamlDisplayPath() string {
return userConfigYamlDisplayPath(currentUserConfigYamlCandidates())
}
func userConfigYamlDisplayPath(candidates userConfigYamlCandidates) string {
if path, err := selectUserConfigYamlPath(candidates); err == nil {
return path
}
return userConfigYamlDisplayFallback
}
View on GitHub (pinned to 71377f2769)
Solutions
- Shorten the TargetID to the allowed length (correct prefix, no duplication).
- Use the issue's canonical short ID rather than an external ref or URL.
- Call types.CheckFieldLen on target IDs client-side before submitting the batch.
Example fix
// before TargetID: "https://tracker.example.com/issues/bd-1234" // too long // after TargetID: "bd-1234"
Defensive patterns
Strategy: validation
Validate before calling
for i, d := range req.Dependencies {
if err := types.CheckFieldLen("dependency target ID", d.TargetID); err != nil {
return fmt.Errorf("dependency %d: %w", i, err)
}
} Try / catch
if err := store.ExecuteCreate(ctx, req); err != nil {
var tooLong interface{ error }
if errors.Is(err, storage.ErrValidation) && errors.Is(err, types.ErrFieldTooLong) { /* trim ID and resubmit */ }
return err
} Prevention
- Use canonical short issue IDs, not URLs or external refs.
- Build IDs from prefix+number once, not by concatenation.
- Pre-run types.CheckFieldLen on all string fields.
When it happens
Trigger: ExecuteCreate/ValidatePublicCreateRequest with request.Dependencies[index].TargetID longer than the configured max ID length; check at public_create.go:165.
Common situations: Concatenating prefix+number by hand and duplicating the prefix ("bd-bd-12345..."), pasting full external refs into TargetID, or schema/config tightening that shortened the max ID length.
Related errors
- ExternalDoltConfig: Host requires Port
- no store is open for this workspace
- ExternalDoltConfig: set either Socket OR (Host, Port), not b
- ExternalDoltConfig: must set Socket or (Host, Port)
- ExternalDoltConfig: Port requires Host
AI-assisted analysis of gastownhall/beads@71377f2769 (2026-08-30).
Data as JSON: /api/errors/46cf112548074337.
Report an issue: GitHub.