Skip to content

CI Fix - tests/core/test_plan.py::test_disable_restatement -- UTC Boundary #5976

Description

@cmgoffena13

AI Notes

Failed test
tests/core/test_plan.py::test_disable_restatement

What's Wrong

  • Assert compares plan.restatements end to to_date("tomorrow") with no pinned clock.
  • Plan build uses now() for restatement end; assertion resolves "tomorrow" again later.
  • Windows fast-test ran ~7+ min and crossed midnight UTC between those two calls.
  • End timestamps differ by exactly 1 day (1787443200000 vs 1787529600000).
  • Not Windows-specific — any long run near UTC midnight can flake.

Possible Fix
Pin the test: @time_machine.travel("2026-08-22 15:00:00 UTC") on test_disable_restatement.
Or stop using relative dates in the assertion — use fixed timestamps from the built plan, e.g. plan.restatements[snapshot.snapshot_id] directly, or explicit execution_time / start / end on PlanBuilder.
time_machine is fine here — unit test, no cloud JWT auth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions