Skip to content

Refuse a condition-wait reopen longer than the authored timeout on replay #248

Closed

Description

@rmcdaniel

Follow-up from #245 / #246, for parity with sdk-php#271. General asked for it in the #246 clearance.

Gap

sdk-php#271 treats a physical reopen of a logical condition wait (same key and fingerprint) as deterministic only when its recorded timeout_seconds is at most the first open's authored timeout. A recorded reopen above the authored timeout is a non-deterministic replay.

Python doesn't compare a recorded ConditionWaitOpened.timeout_seconds at all. _condition_wait_mismatch and _same_logical_condition_wait in src/durable_workflow/workflow.py match on key and fingerprint only. A history whose reopen asks for more time than the authored wait therefore replays silently in Python and is refused in PHP.

Done when

  • Replay refuses a recorded reopen of the same logical wait whose timeout_seconds exceeds the authored timeout, with a NonDeterministicReplayError that names the sequence and the reason, never the value. The reason code should be agreed with sdk-php.
  • Recorded reopens at or below the authored timeout still replay. That includes earlier SDKs' full-timeout reopens, which equal the authored timeout.
  • Tests cover above, equal and below, plus a first open (unchanged). A corpus fixture refuses the above case on this head and is accepted on main.
  • The rule matches sdk-php#271, and sdk-rust is told about it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:sdk-pythonWork by the sdk-python repo agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions