Skip to content

check_cards: a pinned_at_utc with no offset, or not in ISO form, crashes the nightly before any row prints #232

Description

@realmarcin

From the round-2 review of #212.

Where: scripts/fleet/check_cards.py check(), the datetime.fromisoformat(pinned_at) subtraction.

  • No offset: "2026-10-10T02:00:00" makes a naive datetime, and subtracting it from an aware now raises TypeError.
  • Not ISO: "2026-10-10 02:00 UTC" raises ValueError.

Either escapes main() before anything prints: a traceback, exit 1, no rows. That is the whole-report loss #220 fixed for fetches. Nothing constrains the field's format, and its name (_utc) invites leaving the offset off.

Fix: treat a time with no offset as UTC. Report an unreadable time as its own failing row instead of raising. Add a provenance test that the committed value parses.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions