Skip to content

bug(workflow_scheduler): naive/aware datetime comparison at line 758 (TypeError at runtime) #12453

Closed

Description

@mrveiss

Real bug surfaced by #12452 (making workflow_scheduler_e2e_test.py runnable for the first time)

autobot-backend/services/workflow_scheduler.py:758 performs a naive/aware datetime comparison (mixes tz-aware and naive datetimes), which raises TypeError: can't compare offset-naive and offset-aware datetimes at runtime. Was hidden because the e2e test never ran (stub-masked import). Fix: normalize to tz-aware UTC (.replace(tzinfo=timezone.utc) on the naive side, or use autobot_shared.time_utils). Refs #12438. Surfaced by #12452.

Activity

  1. github-actions commented on Jul 25, 2026

    @github-actions
    Contributor

    PR #12457 (merged to Dev_new_gui) references this issue with a close keyword.

    fix(workflow_scheduler): normalize naive/aware datetime comparison to tz-aware UTC (#12453)

    If this issue is fully resolved, close it manually. If work remains, no action is needed.

  2. mrveiss commented on Jul 25, 2026

    @mrveiss
    OwnerAuthor

    Fixed in #12457 (merged to Dev_new_gui): added _ensure_utc_aware normalizing naive datetime objects to tz-aware UTC at both schedule/reschedule entry points. Reproduced (2 failures with exact TypeError) then fixed (7 passed).

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions