{"record":{"id":"63223c5dce119ace","repo":"multica-ai/multica","slug":"expected-a-uuid-prefix-containing-only-hex-charact","errorCode":null,"errorMessage":"expected a UUID prefix containing only hex characters, got %q","messagePattern":"expected a UUID prefix containing only hex characters, got %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"server/cmd/multica/cmd_id_resolver.go","lineNumber":66,"sourceCode":"\treturn idCandidate{\n\t\tID:      strVal(issue, \"id\"),\n\t\tDisplay: issueDisplayKey(issue),\n\t\tDetail:  strVal(issue, \"title\"),\n\t}\n}\n\nfunc normalizeUUIDPrefix(input string) (string, error) {\n\ttrimmed := strings.TrimSpace(input)\n\tif trimmed == \"\" {\n\t\treturn \"\", fmt.Errorf(\"id is required\")\n\t}\n\tprefix := strings.ToLower(strings.ReplaceAll(trimmed, \"-\", \"\"))\n\tif len(prefix) < minShortIDPrefixLen {\n\t\treturn \"\", fmt.Errorf(\"expected a full UUID or at least %d hex characters, got %q\", minShortIDPrefixLen, input)\n\t}\n\tfor _, r := range prefix {\n\t\tif !((r >= '0' && r <= '9') || (r >= 'a' && r <= 'f')) {\n\t\t\treturn \"\", fmt.Errorf(\"expected a UUID prefix containing only hex characters, got %q\", input)\n\t\t}\n\t}\n\treturn prefix, nil\n}\n\nfunc compactUUID(id string) string {\n\treturn strings.ToLower(strings.ReplaceAll(strings.TrimSpace(id), \"-\", \"\"))\n}\n\nfunc resolveIDByPrefix(ctx context.Context, client *cli.APIClient, kind, input string, fetch func(context.Context, *cli.APIClient) ([]idCandidate, error)) (resolvedID, error) {\n\ttrimmed := strings.TrimSpace(input)\n\tif trimmed == \"\" {\n\t\treturn resolvedID{}, fmt.Errorf(\"%s id is required\", kind)\n\t}\n\tif uuidRegexp.MatchString(trimmed) {\n\t\treturn resolvedID{ID: trimmed, Display: trimmed}, nil\n\t}\n","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/multica-ai/multica/blob/2c0912b6ec764b373d44eeea1e80f0d9f11ab417/server/cmd/multica/cmd_id_resolver.go#L48-L84","documentation":"Returned by normalizeUUIDPrefix when the input, after lowercasing and dash-stripping, contains characters outside 0-9 and a-f. Only hexadecimal characters are valid in a UUID, so any other character means the input cannot be a UUID or a UUID prefix.","triggerScenarios":"Passing an id containing 'g'-'z' letters or punctuation, e.g. \"xyz123\", \"hello\", or a human-readable key like \"MUL-123\" to a resolver that only accepts UUIDs (autopilot, project, label, task run prefix resolution).","commonSituations":"Using a human-facing key (MUL-1852) where a UUID is required; passing a name or slug instead of an id; typos or shell interpolation glitches that inject non-hex characters.","solutions":["Pass a UUID or hex-only UUID prefix for this resource kind","If you have a human-readable key, note that only issues accept keys (MUL-123); other resources need the UUID from the corresponding list command with --full-id","Double-check the value for stray characters or shell expansion artifacts"],"exampleFix":"# before\nmultica project show \"my-project\"\n\n# after\nmultica project show \"3f2a9c01\"  # UUID prefix, or full UUID from `multica project list --full-id`","handlingStrategy":"validation","validationCode":"// isHexOnly reports whether s consists solely of hex characters.\nfunc isHexOnly(s string) bool {\n\tif s == \"\" {\n\t\treturn false\n\t}\n\tfor _, r := range strings.ToLower(s) {\n\t\tif !((r >= '0' && r <= '9') || (r >= 'a' && r <= 'f')) {\n\t\t\treturn false\n\t\t}\n\t}\n\treturn true\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Remember only issues accept human keys (MUL-123); all other resources take UUIDs","Route human-readable names through the corresponding list command to obtain the UUID first"],"tags":["cli","validation","id-resolution","uuid"],"backgroundTag":null,"analyzedSha":"2c0912b6ec764b373d44eeea1e80f0d9f11ab417","analyzedAt":"2026-08-15T13:25:18.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}