{"record":{"id":"5af6094e8ee734bd","repo":"nextlevelbuilder/ui-ux-pro-max-skill","slug":"verified-at-has-suspicious-date-value-r","errorCode":null,"errorMessage":"verified-at has suspicious date {value!r}","messagePattern":"verified-at has suspicious date (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"warning","filePath":"scripts/generate-catalog-summary.py","lineNumber":36,"sourceCode":"    with (DATA / name).open(encoding=\"utf-8\", newline=\"\") as handle:\n        return list(csv.DictReader(handle))\n\n\ndef digest(path):\n    return hashlib.sha256(path.read_bytes()).hexdigest()\n\n\ndef load_json(name):\n    return json.loads((DATA / name).read_text(encoding=\"utf-8\"))\n\n\ndef checked_date(value):\n    try:\n        parsed = date.fromisoformat(value)\n    except (TypeError, ValueError) as exc:\n        raise ValueError(\"verified-at must use YYYY-MM-DD\") from exc\n    if parsed.year <= 1970 or parsed > date.today():\n        raise ValueError(f\"verified-at has suspicious date {value!r}\")\n    return value\n\n\ndef build(verified_at):\n    styles = rows(\"styles.csv\")\n    stack_paths = sorted((DATA / \"stacks\").glob(\"*.csv\"))\n    licenses = load_json(\"google-font-licenses.json\")\n    icons = load_json(\"phosphor-icons-upstream.json\")\n    excluded = licenses.get(\"excludedFamilies\", [])\n    counts = {\n        \"styles\": {\n            \"total\": len(styles),\n            \"searchable\": sum(row.get(\"Status\") != \"deprecated\" for row in styles),\n            \"active\": sum(row.get(\"Status\") == \"active\" for row in styles),\n            \"supplemental\": sum(row.get(\"Status\") == \"supplemental\" for row in styles),\n            \"deprecated\": sum(row.get(\"Status\") == \"deprecated\" for row in styles),\n        },\n        \"products\": len(rows(\"products.csv\")),","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/nextlevelbuilder/ui-ux-pro-max-skill/blob/a38d04c3d5c298c851dbe5e6ee1965ee3de42cb5/scripts/generate-catalog-summary.py#L18-L54","documentation":"The second half of checked_date(): a syntactically valid date is rejected when year <= 1970 (epoch sentinel / obviously wrong) or the date is in the future relative to the local system clock. It guards the catalog's verifiedAt stamp against obviously bogus values that would undermine the 'verified on' claim.","triggerScenarios":"Passing a future date (--verified-at 2027-01-01 when the machine says 2026), a 1970-01-01 placeholder, or running on a machine whose clock is set in the past so today's real date looks like the future.","commonSituations":"CI runners with wrong clocks or NTP drift; UTC vs local day-boundary races near midnight in western timezones; hardcoded placeholder 1970 dates; year typos.","solutions":["Use today's local date: --verified-at $(date +%F).","Check the system clock (`date`) — fix NTP/timezone if the machine is behind.","On GitHub Actions near UTC midnight, pin the intended date explicitly instead of computing it."],"exampleFix":"# before\npython3 scripts/generate-catalog-summary.py --verified-at 2027-01-01\n# after\npython3 scripts/generate-catalog-summary.py --verified-at $(date +%F)","handlingStrategy":"validation","validationCode":"from datetime import date, timedelta\n\ndef plausible_verified_date(s):\n    try:\n        d = date.fromisoformat(s)\n    except (TypeError, ValueError):\n        return False\n    return date(1970, 1, 2) <= d <= date.today() + timedelta(days=1)\n\nassert plausible_verified_date(args.verified_at), 'verified-at must be today (or recent past) in YYYY-MM-DD'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Sync CI runner clocks (NTP) so date.today() is trustworthy.","Pin the exact date in workflows that run near UTC midnight in western timezones.","Don't hand-type dates; derive them."],"tags":["python","date-validation","ci","developer-tooling"],"backgroundTag":null,"analyzedSha":"a38d04c3d5c298c851dbe5e6ee1965ee3de42cb5","analyzedAt":"2026-08-14T18:51:02.321Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}