{"record":{"id":"060408d89585bd72","repo":"JuliusBrussee/caveman","slug":"s-s-s-verified-at-is-in-the-future","errorCode":null,"errorMessage":"%s %s/%s: verified_at is in the future","messagePattern":"(.+?) (.+?)/(.+?): verified_at is in the future","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shared/platform/catalog/catalog.go","lineNumber":277,"sourceCode":"\t}\n\tseen := make(map[string]struct{}, len(decoded))\n\tfor i, entry := range decoded {\n\t\tlabel := fmt.Sprintf(\"entry %d\", i)\n\t\tif strings.TrimSpace(entry.Provider) == \"\" || strings.TrimSpace(entry.Model) == \"\" || strings.TrimSpace(entry.Region) == \"\" {\n\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}","sourceCodeStart":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/JuliusBrussee/caveman/blob/27d5a3981a347890211bb1bf2439e5c821a63bc9/shared/platform/catalog/catalog.go#L259-L295","documentation":"Thrown by the catalog YAML loader when an entry's verified_at timestamp lies more than 24 hours in the future (UTC). A future-dated verification would misrepresent when prices were checked, so the loader rejects it; the 24h tolerance absorbs reasonable clock skew.","triggerScenarios":"verified_at like \"2027-01-01T00:00:00Z\" when today is in 2026, or any timestamp more than 24h past time.Now().UTC() — often from a typo in the year, or a machine with a badly wrong clock producing 'now' dates that are ahead for everyone else.","commonSituations":"Typo'd year (2026 vs 2027); timestamps written on a host whose clock is set months ahead; CI regenerating the catalog with a mocked future time.","solutions":["Correct the timestamp to the actual verification date (past or within 24h of now).","Regenerate the field from the machine's real clock at verification time: date -u +%Y-%m-%dT%H:%M:%SZ.","If it was a build-host clock issue, fix NTP on that host so generated catalogs aren't future-dated."],"exampleFix":"# before\nverified_at: 2027-08-15T00:00:00Z\n\n# after\nverified_at: 2026-08-14T18:30:00Z","handlingStrategy":"validation","validationCode":"func notFutureBeyond24h(s string) bool {\n    t, err := time.Parse(time.RFC3339, s)\n    return err == nil && !t.After(time.Now().UTC().Add(24*time.Hour))\n}","typeGuard":null,"tryCatchPattern":"Fail catalog load at startup; fix the date in data. Do not widen the tolerance in code to work around bad data.","preventionTips":["Double-check the year when hand-editing dates.","Keep NTP enabled on hosts and CI runners that generate catalogs.","Treat future-dated rows as data-entry bugs in review."],"tags":["catalog","yaml","timestamp","validation"],"backgroundTag":null,"analyzedSha":"27d5a3981a347890211bb1bf2439e5c821a63bc9","analyzedAt":"2026-08-15T09:26:11.751Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}