nextlevelbuilder/ui-ux-pro-max-skill · warning · ValueError

verified-at has suspicious date {value!r}

Error message

verified-at has suspicious date {value!r}

What it means

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.

Source

Thrown at scripts/generate-catalog-summary.py:36

    with (DATA / name).open(encoding="utf-8", newline="") as handle:
        return list(csv.DictReader(handle))


def digest(path):
    return hashlib.sha256(path.read_bytes()).hexdigest()


def load_json(name):
    return json.loads((DATA / name).read_text(encoding="utf-8"))


def checked_date(value):
    try:
        parsed = date.fromisoformat(value)
    except (TypeError, ValueError) as exc:
        raise ValueError("verified-at must use YYYY-MM-DD") from exc
    if parsed.year <= 1970 or parsed > date.today():
        raise ValueError(f"verified-at has suspicious date {value!r}")
    return value


def build(verified_at):
    styles = rows("styles.csv")
    stack_paths = sorted((DATA / "stacks").glob("*.csv"))
    licenses = load_json("google-font-licenses.json")
    icons = load_json("phosphor-icons-upstream.json")
    excluded = licenses.get("excludedFamilies", [])
    counts = {
        "styles": {
            "total": len(styles),
            "searchable": sum(row.get("Status") != "deprecated" for row in styles),
            "active": sum(row.get("Status") == "active" for row in styles),
            "supplemental": sum(row.get("Status") == "supplemental" for row in styles),
            "deprecated": sum(row.get("Status") == "deprecated" for row in styles),
        },
        "products": len(rows("products.csv")),

View on GitHub (pinned to a38d04c3d5)

Solutions

  1. Use today's local date: --verified-at $(date +%F).
  2. Check the system clock (`date`) — fix NTP/timezone if the machine is behind.
  3. On GitHub Actions near UTC midnight, pin the intended date explicitly instead of computing it.

Example fix

# before
python3 scripts/generate-catalog-summary.py --verified-at 2027-01-01
# after
python3 scripts/generate-catalog-summary.py --verified-at $(date +%F)
Defensive patterns

Strategy: validation

Validate before calling

from datetime import date, timedelta

def plausible_verified_date(s):
    try:
        d = date.fromisoformat(s)
    except (TypeError, ValueError):
        return False
    return date(1970, 1, 2) <= d <= date.today() + timedelta(days=1)

assert plausible_verified_date(args.verified_at), 'verified-at must be today (or recent past) in YYYY-MM-DD'

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of nextlevelbuilder/ui-ux-pro-max-skill@a38d04c3d5 (2026-08-14). Data as JSON: /api/errors/5af6094e8ee734bd. Report an issue: GitHub.