nextlevelbuilder/ui-ux-pro-max-skill · warning · ValueError
verified-at must use YYYY-MM-DD
Error message
verified-at must use YYYY-MM-DD
What it means
generate-catalog-summary.py validates its --verified-at argument with date.fromisoformat(); anything that isn't a strict ISO YYYY-MM-DD date raises ValueError('verified-at must use YYYY-MM-DD'). It exists because the date is embedded into catalog-summary.json as the verification stamp and must stay machine-parseable.
Source
Thrown at scripts/generate-catalog-summary.py:34
def rows(name):
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),View on GitHub (pinned to a38d04c3d5)
Solutions
- Use the zero-padded ISO form: --verified-at 2026-08-14.
- In scripts, use `date +%F` (equivalent to `date +%Y-%m-%d`) which emits ISO format.
- When running --check with no argument, remember the date is read from the existing catalog-summary.json instead — only generation requires the flag.
Example fix
# before python3 scripts/generate-catalog-summary.py --verified-at 2026-8-14 # after python3 scripts/generate-catalog-summary.py --verified-at $(date +%F)
Defensive patterns
Strategy: validation
Validate before calling
from datetime import date
def is_iso_date(s):
try:
date.fromisoformat(s)
return True
except (TypeError, ValueError):
return False
assert is_iso_date(args.verified_at), 'pass --verified-at as YYYY-MM-DD (e.g. $(date +%F))' Prevention
- Always pass $(date +%F) from scripts instead of assembling dates manually.
- Never use unpadded %-m/%-d strftime tokens for this flag.
- Add a CI lint for the flag format.
When it happens
Trigger: Passing --verified-at 2026-8-14 (no zero padding), '14-08-2026', '2026/08/14', a datetime like '2026-08-14T00:00:00', or no value at all when generation requires it (None hits the TypeError branch).
Common situations: Shell scripts building the date with unpadded strftime tokens (`date +%-Y-%-m-%-d`); CI passing a git timestamp with a time component; humans typing natural-language dates.
Related errors
- verified-at has suspicious date {value!r}
- catalog-summary.json is missing
- Refusing to modify path outside repository: ${resolvedPath}
- Source directory does not exist: ${sourceDir}
- Invalid JSON file {path}: {error}
AI-assisted analysis of nextlevelbuilder/ui-ux-pro-max-skill@a38d04c3d5 (2026-08-14).
Data as JSON: /api/errors/f4e47d421cfbec21.
Report an issue: GitHub.