{"record":{"id":"46cf112548074337","repo":"gastownhall/beads","slug":"no-absolute-native-user-directory-is-available","errorCode":null,"errorMessage":"no absolute native user directory is available","messagePattern":"no absolute native user directory is available","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/config/user_config_path.go","lineNumber":86,"sourceCode":"}\n\nfunc selectUserConfigYamlPath(candidates userConfigYamlCandidates) (string, error) {\n\tif userConfigPathExists(candidates.documented) {\n\t\treturn candidates.documented, nil\n\t}\n\tif candidates.native != candidates.documented && userConfigPathExists(candidates.native) {\n\t\treturn candidates.native, nil\n\t}\n\tif candidates.documented != \"\" {\n\t\treturn candidates.documented, nil\n\t}\n\tif candidates.native != \"\" {\n\t\treturn candidates.native, nil\n\t}\n\n\terr := errors.Join(candidates.homeErr, candidates.nativeErr)\n\tif err == nil {\n\t\terr = errors.New(\"no absolute native user directory is available\")\n\t}\n\treturn \"\", fmt.Errorf(\"resolve user config.yaml: %w\", err)\n}\n\n// UserConfigYamlDisplayPath returns a human-readable location for command\n// output. The tilde form is deliberately confined to this display-only API and\n// must never be passed to a filesystem operation.\nfunc UserConfigYamlDisplayPath() string {\n\treturn userConfigYamlDisplayPath(currentUserConfigYamlCandidates())\n}\n\nfunc userConfigYamlDisplayPath(candidates userConfigYamlCandidates) string {\n\tif path, err := selectUserConfigYamlPath(candidates); err == nil {\n\t\treturn path\n\t}\n\treturn userConfigYamlDisplayFallback\n}\n","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/gastownhall/beads/blob/71377f276968b452ee607177637970a4ff888584/internal/config/user_config_path.go#L68-L104","documentation":"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.","triggerScenarios":"ExecuteCreate/ValidatePublicCreateRequest with request.Dependencies[index].TargetID longer than the configured max ID length; check at public_create.go:165.","commonSituations":"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.","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."],"exampleFix":"// before\nTargetID: \"https://tracker.example.com/issues/bd-1234\" // too long\n// after\nTargetID: \"bd-1234\"","handlingStrategy":"validation","validationCode":"for i, d := range req.Dependencies {\n    if err := types.CheckFieldLen(\"dependency target ID\", d.TargetID); err != nil {\n        return fmt.Errorf(\"dependency %d: %w\", i, err)\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := store.ExecuteCreate(ctx, req); err != nil {\n    var tooLong interface{ error }\n    if errors.Is(err, storage.ErrValidation) && errors.Is(err, types.ErrFieldTooLong) { /* trim ID and resubmit */ }\n    return err\n}","preventionTips":["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."],"tags":["go","validation","field-length","dependencies"],"backgroundTag":"field-too-long","analyzedSha":"71377f276968b452ee607177637970a4ff888584","analyzedAt":"2026-08-30T18:55:39.744Z","schemaVersion":2},"datasetVersion":"2026-08-30T23:17:21.991Z"}