Skip to content

RetryPolicy accepts values that fail later: timedelta durations, fractional counts and huge durations #89

Closed

Description

@fctl-sh

Priority: medium. docs/reference/configuration.md says durations accept timedelta, but:

  • RetryPolicy(base_delay=timedelta(milliseconds=10)) raises TypeError ('<' not supported): client.py validates through seconds() but keeps the unconverted value. With both delays as timedelta, the policy constructs, and every client using it fails at connect with ConfigurationError: must be real number, not datetime.timedelta.
  • max_attempts=2.5 and Client(batch_concurrency=2.5) pass construction and fail at the first call.
  • Huge but finite durations pass validation, then panic in the core: timeout=1e20, RetryPolicy(base_delay=1e300, max_delay=1e300) and wait_until_active(timeout=1e19) raise DynamoxyError: internal error: a dynamoxy task panicked (Duration::from_secs_f64 above about 1.8e19 seconds, and Instant + timeout overflow; crates/dynamoxy-core/src/config.rs, retry.rs, client.rs).

Fix: convert durations when validating, require integers for counts, and bound durations (or saturate them) in config.rs.

Found in a review of the library for bugs (fctl session); the fixes that fit in its ten pull requests are #61 to #65, #67 to #70 and #72.

Activity

  1. added
    bug
    on Oct 30, 2026
  2. added a commit that references this issue on Oct 31, 2026
    4ab6081
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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions