Skip to content

rust: validate exact lake timestamps before minting IDs #978

Closed

Description

@athvin

Evidence

parse_lake_timestamp_ms accepts impossible dates such as 2026-02-31, negative hours/minutes/seconds, and trailing fields because it checks only broad upper bounds and never checks for extra components. DeterministicV7Factory::from_lake_timestamp can mint an ID from a normalized invalid run stamp. Source.

Change

Validate the exact UTC YYYY-MM-DD HH:MM:SS shape, full calendar date, and each nonnegative time component before converting to milliseconds.

Done when

  • Impossible dates and non-leap-year February 29 are rejected; valid leap day is accepted.
  • Negative or trailing date/time components are rejected.
  • Extreme year input returns an error/None without panic, and valid timestamps keep their current IDs.

Activity

  1. added
    code-cleanup
    on Nov 9, 2026
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

    code-cleanup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions