JuliusBrussee/caveman · error · CatalogError
: verified_at is in the future
Error message
{label}: verified_at is in the future What it means
The row's verified_at timestamp is parsed with parsed_time and compared against the current time ('now' passed in by validate_catalog). If verified_at is later than now, the row claims verification from the future, which is impossible, so validation fails.
Solutions
- Set verified_at to the actual date the data was verified (on or before now)
- Check the generator's timezone/clock and ensure UTC-consistent timestamps
- Fix the year/month typo in the timestamp
- For tests, use a 'now' fixture aligned with validate_catalog's now parameter
Example fix
// before verified_at: 2027-01-15T00:00:00Z // after verified_at: 2026-09-15T00:00:00Z
Defensive patterns
Strategy: validation
Validate before calling
from datetime import datetime, timezone
va = datetime.fromisoformat(row["verified_at"].replace("Z", "+00:00"))
assert va <= datetime.now(timezone.utc), "verified_at is in the future" Type guard
def verified_at_is_past(ts, now):
return ts is not None and ts <= now Try / catch
try:
validate_catalog(rows, now=now)
except CatalogError as e:
if "verified_at is in the future" in str(e):
row["verified_at"] = now.isoformat()
raise Prevention
- Generate timestamps from a UTC clock in one helper
- Never hand-type dates; derive them from now()
- Clamp timestamps to now at generation time
When it happens
Trigger: verified_at set to a future date (typo in year, wrong timezone shifting the value ahead of now, or a clock-skewed generator).
Common situations: Typing 2027 instead of 2026; generating timestamps with a misconfigured system clock; mixing UTC-naive and UTC-aware datetimes so an offset pushes the value past now; test fixtures with far-future dates.
Related errors
- : verified_at is older than 120 days
- / : capabilities_verified_at is in the future
- catalog
- duplicate provider/model/region row
- invalid --since (want RFC3339)
AI-assisted analysis of JuliusBrussee/caveman@3ee70a1026 (2026-09-20).
Data as JSON: /api/errors/cbc98e8a56a966cd.
Report an issue: GitHub.
Appendix: source
Thrown at shared/provider-catalog/validate_catalog.py:164
continue
if isinstance(value, bool) or not isinstance(value, (int, float)):
raise CatalogError(f"{label}: pricing.{field} must be numeric or null")
if not math.isfinite(value) or value < 0:
raise CatalogError(f"{label}: pricing.{field} must be finite and nonnegative")
if field == "batch_discount_fraction" and value > 1:
raise CatalogError(f"{label}: pricing.batch_discount_fraction must be <= 1")
if not isinstance(row["capabilities"], dict):
raise CatalogError(f"{label}: capabilities must be an object")
sources = row["sources"]
if not isinstance(sources, list) or not sources:
raise CatalogError(f"{label}: sources must be a non-empty list")
if any(not isinstance(source, str) or not source.startswith("https://") for source in sources):
raise CatalogError(f"{label}: every source must be HTTPS")
verified_at = parsed_time(row["verified_at"], label)
if verified_at > now:
raise CatalogError(f"{label}: verified_at is in the future")
if verified_at < now - timedelta(days=120):
raise CatalogError(f"{label}: verified_at is older than 120 days")
return identity[0], identity[1], identity[2]
def check_review_markers(text: str, label: str) -> None:
"""Refuse a catalog that still carries an unreviewed sync proposal.
YAML comments are invisible to the parsed rows, so this reads the raw file:
a rubber-stamped merge must not be able to advance price provenance while
the line saying "nobody has confirmed this yet" is still in the file.
"""
offending = [
index + 1
for index, line in enumerate(text.splitlines())
if line.lstrip().startswith(REVIEW_MARKER)
]
if offending:View on GitHub (pinned to 3ee70a1026)