{"record":{"id":"12abe6dd682f422b","repo":"JuliusBrussee/caveman","slug":"s-s-s-capabilities-verified-at-must-be-rfc3339","errorCode":null,"errorMessage":"%s %s/%s: capabilities_verified_at must be RFC3339","messagePattern":"(.+?) (.+?)/(.+?): capabilities_verified_at must be RFC3339","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shared/platform/catalog/catalog.go","lineNumber":341,"sourceCode":"\t\t\treturn nil, fmt.Errorf(\"%s: provider, model, and region are required\", label)\n\t\t}\n\t\tif entry.Currency != \"USD\" {\n\t\t\treturn nil, fmt.Errorf(\"%s %s/%s: unsupported currency %q\", label, entry.Provider, entry.Model, entry.Currency)\n\t\t}\n\t\tif !cost.ValidPrice(entry.Pricing) {\n\t\t\treturn nil, fmt.Errorf(\"%s %s/%s: invalid pricing\", label, entry.Provider, entry.Model)\n\t\t}\n\t\tverified, err := time.Parse(time.RFC3339, entry.VerifiedAt)\n\t\tif err != nil || verified.IsZero() {\n\t\t\treturn nil, fmt.Errorf(\"%s %s/%s: verified_at must be RFC3339\", label, entry.Provider, entry.Model)\n\t\t}\n\t\tif verified.After(time.Now().UTC().Add(24 * time.Hour)) {\n\t\t\treturn nil, fmt.Errorf(\"%s %s/%s: verified_at is in the future\", label, entry.Provider, entry.Model)\n\t\t}\n\t\tif entry.CapabilitiesVerifiedAt != \"\" {\n\t\t\tcapVerified, err := time.Parse(time.RFC3339, entry.CapabilitiesVerifiedAt)\n\t\t\tif err != nil || capVerified.IsZero() {\n\t\t\t\treturn nil, fmt.Errorf(\"%s %s/%s: capabilities_verified_at must be RFC3339\", label, entry.Provider, entry.Model)\n\t\t\t}\n\t\t\tif capVerified.After(time.Now().UTC().Add(24 * time.Hour)) {\n\t\t\t\treturn nil, fmt.Errorf(\"%s %s/%s: capabilities_verified_at is in the future\", label, entry.Provider, entry.Model)\n\t\t\t}\n\t\t}\n\t\tif len(entry.Sources) == 0 {\n\t\t\treturn nil, fmt.Errorf(\"%s %s/%s: at least one source is required\", label, entry.Provider, entry.Model)\n\t\t}\n\t\tfor _, rawURL := range entry.Sources {\n\t\t\tu, err := url.ParseRequestURI(rawURL)\n\t\t\tif err != nil || u.Scheme != \"https\" || u.Host == \"\" {\n\t\t\t\treturn nil, fmt.Errorf(\"%s %s/%s: invalid HTTPS source %q\", label, entry.Provider, entry.Model, rawURL)\n\t\t\t}\n\t\t}\n\t\tkey := entry.Provider + \"\\x00\" + entry.Model + \"\\x00\" + entry.Region\n\t\tif _, duplicate := seen[key]; duplicate {\n\t\t\treturn nil, fmt.Errorf(\"duplicate provider/model/region row %s/%s@%s\", entry.Provider, entry.Model, entry.Region)\n\t\t}","sourceCodeStart":323,"sourceCodeEnd":359,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/3ee70a102609e550bd2e68004bf5990a9341c851/shared/platform/catalog/catalog.go#L323-L359","documentation":"When an entry includes capabilities_verified_at, it must parse as RFC3339 and be non-zero; otherwise the row is rejected. The optional field, once present, is held to the same timestamp standard as verified_at.","triggerScenarios":"DecodeAndValidate sees a non-empty capabilities_verified_at that fails time.Parse(time.RFC3339) or is zero — e.g. '09/2026', 'unknown', an epoch number, or a date-only string.","commonSituations":"A capabilities audit tool writing a locale-formatted date, a placeholder left in the field, or a schema migration emitting epoch seconds where an RFC3339 string is expected.","solutions":["Set capabilities_verified_at to a valid RFC3339 string like '2026-09-20T00:00:00Z'.","If capabilities were never verified, remove/empty the field entirely rather than leaving a bad value.","Regenerate the field with time.Now().UTC().Format(time.RFC3339).","Quote the YAML value so the parser keeps it a string."],"exampleFix":"# before\ncapabilities_verified_at: 09/2026\n# after\ncapabilities_verified_at: \"2026-09-20T00:00:00Z\"","handlingStrategy":"validation","validationCode":"if e.CapabilitiesVerifiedAt != \"\" {\n\tif _, err := time.Parse(time.RFC3339, e.CapabilitiesVerifiedAt); err != nil {\n\t\treturn fmt.Errorf(\"capabilities_verified_at must be RFC3339: %v\", err)\n\t}\n}","typeGuard":null,"tryCatchPattern":"if _, err := catalog.DecodeAndValidate(raw); err != nil {\n\tif strings.Contains(err.Error(), \"capabilities_verified_at\") {\n\t\treturn fmt.Errorf(\"fix or drop capabilities_verified_at: %w\", err)\n\t}\n\treturn err\n}","preventionTips":["Emit the field only from the audit tool with RFC3339 formatting","Omit the field entirely when capabilities were never verified","Quote timestamp values in YAML and lint them in CI"],"tags":["catalog","timestamp","rfc3339"],"backgroundTag":"invalid-date-format","analyzedSha":"3ee70a102609e550bd2e68004bf5990a9341c851","analyzedAt":"2026-09-20T15:53:39.229Z","contentChangedAt":"2026-09-20T15:53:39.229Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}