durable-workflow 2.27.0__tar.gz → 2.29.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. {durable_workflow-2.27.0/src/durable_workflow.egg-info → durable_workflow-2.29.0}/PKG-INFO +1 -1
  2. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/pyproject.toml +3 -3
  3. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/replay_clock.py +79 -22
  4. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/workflow.py +21 -4
  5. {durable_workflow-2.27.0 → durable_workflow-2.29.0/src/durable_workflow.egg-info}/PKG-INFO +1 -1
  6. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_business_replay_clock_parallel.py +148 -1
  7. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_replay_regression_corpus.py +4 -0
  8. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/LICENSE +0 -0
  9. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/README.md +0 -0
  10. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/setup.cfg +0 -0
  11. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/__init__.py +0 -0
  12. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_activity_checkpoint.py +0 -0
  13. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_activity_lease.py +0 -0
  14. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_activity_process.py +0 -0
  15. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_avro.py +0 -0
  16. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_cancellation_scope.py +0 -0
  17. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_cancellation_scope_history.py +0 -0
  18. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_capabilities_digest.py +0 -0
  19. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_condition_fingerprint.py +0 -0
  20. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_condition_input_order.py +0 -0
  21. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_continue_as_new.py +0 -0
  22. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_cooperative_cancellation.py +0 -0
  23. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_failure_reporting.py +0 -0
  24. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_metric_routes.py +0 -0
  25. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_parallel_group_policy.py +0 -0
  26. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_payload_protection.py +0 -0
  27. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_poll_transport.py +0 -0
  28. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_prepared_local_activity.py +0 -0
  29. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_query_task_authority.py +0 -0
  30. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_response_limit.py +0 -0
  31. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_sticky_workflow_cache.py +0 -0
  32. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_timeout_cleanup.py +0 -0
  33. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/_typed_values.py +0 -0
  34. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/activity.py +0 -0
  35. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/auth_composition.py +0 -0
  36. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/cancellation.py +0 -0
  37. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/client.py +0 -0
  38. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/errors.py +0 -0
  39. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/external_storage.py +0 -0
  40. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/external_task_input.py +0 -0
  41. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/external_task_result.py +0 -0
  42. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/history_bundle_verify.py +0 -0
  43. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/interceptors.py +0 -0
  44. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/invocable.py +0 -0
  45. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/metrics.py +0 -0
  46. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/nexus.py +0 -0
  47. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/prepared_payload.py +0 -0
  48. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/py.typed +0 -0
  49. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/python_conformance.py +0 -0
  50. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/replay_clock_math.py +0 -0
  51. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/replay_conformance.py +0 -0
  52. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/replay_verify.py +0 -0
  53. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/retry_policy.py +0 -0
  54. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/serializer.py +0 -0
  55. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/server_compatibility.json +0 -0
  56. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/sync.py +0 -0
  57. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/telemetry.py +0 -0
  58. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/telemetry_carrier.py +0 -0
  59. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/testing.py +0 -0
  60. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/worker.py +0 -0
  61. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/worker_session.py +0 -0
  62. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/worker_status.py +0 -0
  63. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow/workflow_updates_conformance.py +0 -0
  64. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow.egg-info/SOURCES.txt +0 -0
  65. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow.egg-info/dependency_links.txt +0 -0
  66. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow.egg-info/entry_points.txt +0 -0
  67. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow.egg-info/requires.txt +0 -0
  68. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/src/durable_workflow.egg-info/top_level.txt +0 -0
  69. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_acceptance_authority.py +0 -0
  70. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_acceptance_consumer.py +0 -0
  71. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_acceptance_entry.py +0 -0
  72. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_cancellation_policies.py +0 -0
  73. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_checkpoint.py +0 -0
  74. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_context.py +0 -0
  75. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_exponential_retry.py +0 -0
  76. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_heartbeat_authority.py +0 -0
  77. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_heartbeat_unavailable.py +0 -0
  78. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_identity.py +0 -0
  79. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_install_inventory.py +0 -0
  80. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_lease_authority.py +0 -0
  81. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_lease_renewal.py +0 -0
  82. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_lease_worker.py +0 -0
  83. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_process.py +0 -0
  84. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_retry_cap_cell.py +0 -0
  85. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_retry_info.py +0 -0
  86. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_run_closed_refusal.py +0 -0
  87. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_activity_worker_lost.py +0 -0
  88. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_auth_composition.py +0 -0
  89. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_avro_value_benchmark.py +0 -0
  90. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_avro_value_protocol.py +0 -0
  91. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_business_replay_clock.py +0 -0
  92. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_business_replay_clock_child.py +0 -0
  93. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_business_replay_clock_entry.py +0 -0
  94. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_business_replay_clock_query_attestation.py +0 -0
  95. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_business_replay_clock_redrive.py +0 -0
  96. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_business_replay_clock_sequence_claims.py +0 -0
  97. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_cancellation_cause.py +0 -0
  98. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_cancellation_context.py +0 -0
  99. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_cancellation_remaining_time.py +0 -0
  100. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_cancellation_scope_admission.py +0 -0
  101. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_cancellation_scope_authoring.py +0 -0
  102. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_cancellation_scope_boundary.py +0 -0
  103. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_cancellation_scope_opening.py +0 -0
  104. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_capabilities_digest.py +0 -0
  105. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_capabilities_digest_unknown.py +0 -0
  106. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_checkpointed_batch_example.py +0 -0
  107. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_child_workflow_policies.py +0 -0
  108. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_ci_checkout.py +0 -0
  109. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_ci_integration_endpoint.py +0 -0
  110. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_client.py +0 -0
  111. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_client_iterators.py +0 -0
  112. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_client_payload_protection.py +0 -0
  113. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_client_telemetry.py +0 -0
  114. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_client_timeouts.py +0 -0
  115. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_coalescing_signal_timer_replay.py +0 -0
  116. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_codec_regression_corpus.py +0 -0
  117. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_command_keys_acceptance.py +0 -0
  118. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_command_keys_captured_inputs.py +0 -0
  119. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_command_keys_container_ownership.py +0 -0
  120. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_command_keys_workspace.py +0 -0
  121. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_committed_cancellation_scope_descendants.py +0 -0
  122. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_committed_cancellation_scope_groups.py +0 -0
  123. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_committed_cancellation_scope_history.py +0 -0
  124. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_committed_cancellation_scope_replay.py +0 -0
  125. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_completion_size_limit.py +0 -0
  126. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_condition_fingerprint.py +0 -0
  127. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_condition_occurrence_id.py +0 -0
  128. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_condition_replay_drift.py +0 -0
  129. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_continue_as_new_target.py +0 -0
  130. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_control_plane_parity_fixtures.py +0 -0
  131. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_cooperative_cancellation.py +0 -0
  132. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_cooperative_cancellation_client.py +0 -0
  133. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_cooperative_cancellation_worker.py +0 -0
  134. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_cooperative_remote_worker.py +0 -0
  135. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_docs_release_channel.py +0 -0
  136. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_docstring_cross_references.py +0 -0
  137. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_durable_selection.py +0 -0
  138. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_empty_callback_failure.py +0 -0
  139. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_errors.py +0 -0
  140. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_external_storage.py +0 -0
  141. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_external_task_input.py +0 -0
  142. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_external_task_result.py +0 -0
  143. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_failure_reporting.py +0 -0
  144. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_generator_lifecycle.py +0 -0
  145. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_golden_history_replay.py +0 -0
  146. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_history_bundle_pruned.py +0 -0
  147. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_history_bundle_schema2.py +0 -0
  148. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_history_bundle_verify.py +0 -0
  149. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_history_event_contract.py +0 -0
  150. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_invocable.py +0 -0
  151. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_local_activity_backoff.py +0 -0
  152. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_local_failure_reporting.py +0 -0
  153. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_message_streams.py +0 -0
  154. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_metric_routes.py +0 -0
  155. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_metrics.py +0 -0
  156. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_native_timer_redrive_cell.py +0 -0
  157. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_native_timer_redrive_clock.py +0 -0
  158. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_nexus_durable_wait.py +0 -0
  159. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_nexus_namespace.py +0 -0
  160. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_nexus_wire.py +0 -0
  161. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_order_processing_example.py +0 -0
  162. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_ordered_condition_input.py +0 -0
  163. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_parallel_completion_order_replay.py +0 -0
  164. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_parallel_failure_order.py +0 -0
  165. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_parallel_group_boundaries.py +0 -0
  166. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_parallel_group_policy.py +0 -0
  167. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_parallel_member_failure_open_siblings.py +0 -0
  168. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_parallel_saga_authoring.py +0 -0
  169. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_patch_history.py +0 -0
  170. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_payload_policy_refresh.py +0 -0
  171. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_payload_protection.py +0 -0
  172. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_pending_operation_replay.py +0 -0
  173. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_physical_command_key_readback.py +0 -0
  174. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_poll_failure_backoff.py +0 -0
  175. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_poll_transport.py +0 -0
  176. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_portal_source_split.py +0 -0
  177. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_prepared_local_activity_client.py +0 -0
  178. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_prepared_local_activity_groups.py +0 -0
  179. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_prepared_local_activity_policies.py +0 -0
  180. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_prepared_local_activity_worker.py +0 -0
  181. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_protected_workflow_replay.py +0 -0
  182. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_public_boundary_scanner.py +0 -0
  183. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_publish_workflow_isolation.py +0 -0
  184. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_published_activity_acceptance.py +0 -0
  185. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_published_pagination_evidence.py +0 -0
  186. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_pypi_project_surface.py +0 -0
  187. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_python_conformance.py +0 -0
  188. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_queries.py +0 -0
  189. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_query_task_authority.py +0 -0
  190. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_query_timeout_retry.py +0 -0
  191. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_quiesced_snapshot.py +0 -0
  192. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_readme_quickstart.py +0 -0
  193. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_redrive_call_ledger.py +0 -0
  194. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_redrive_replay.py +0 -0
  195. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_redrive_successor_evidence.py +0 -0
  196. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_registration_ambiguity.py +0 -0
  197. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_release_metadata.py +0 -0
  198. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_release_promotion.py +0 -0
  199. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_replay.py +0 -0
  200. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_replay_clock.py +0 -0
  201. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_replay_conformance.py +0 -0
  202. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_replay_verify.py +0 -0
  203. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_response_body_limit.py +0 -0
  204. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_result_continue_as_new.py +0 -0
  205. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_retry_cap_download.py +0 -0
  206. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_retry_cap_workflow.py +0 -0
  207. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_retry_policy.py +0 -0
  208. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_run_activities.py +0 -0
  209. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_run_cancellation_scope_replay.py +0 -0
  210. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_run_closed_settlement_replay.py +0 -0
  211. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_runtime_external_payload_transport.py +0 -0
  212. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_schedule_origin.py +0 -0
  213. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_schedules.py +0 -0
  214. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_scoped_run_cancellation_context.py +0 -0
  215. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_sdk_metrics_contract.py +0 -0
  216. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_search_attribute_replay_identity.py +0 -0
  217. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_serializer.py +0 -0
  218. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_signal_external_workflow.py +0 -0
  219. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_signal_with_start.py +0 -0
  220. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_signals.py +0 -0
  221. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_sleep.py +0 -0
  222. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_standalone_activity_client.py +0 -0
  223. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_static_credential_validation.py +0 -0
  224. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_sticky_execution.py +0 -0
  225. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_sticky_history_suffix.py +0 -0
  226. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_storage_admission.py +0 -0
  227. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_sync.py +0 -0
  228. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_sync_activities.py +0 -0
  229. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_synthetic_command_key_readback.py +0 -0
  230. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_telemetry.py +0 -0
  231. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_telemetry_carrier.py +0 -0
  232. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_testing_failures.py +0 -0
  233. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_testing_harness.py +0 -0
  234. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_testing_nexus.py +0 -0
  235. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_threaded_heartbeat_example.py +0 -0
  236. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_timeout_cleanup.py +0 -0
  237. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_tls_trust.py +0 -0
  238. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_transport_diagnostics.py +0 -0
  239. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_typed_values.py +0 -0
  240. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_typed_workflow_values.py +0 -0
  241. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_update_outcome.py +0 -0
  242. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_update_signal_condition_replay.py +0 -0
  243. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_updates.py +0 -0
  244. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_wait_condition.py +0 -0
  245. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_worker.py +0 -0
  246. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_worker_deregistration.py +0 -0
  247. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_worker_observation.py +0 -0
  248. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_worker_session.py +0 -0
  249. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_worker_startup_buffered.py +0 -0
  250. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_worker_startup_raw.py +0 -0
  251. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_worker_startup_read_budget.py +0 -0
  252. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_worker_startup_snapshot.py +0 -0
  253. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_worker_status.py +0 -0
  254. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_worker_telemetry_wire.py +0 -0
  255. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_worker_transient_5xx_retry.py +0 -0
  256. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_worker_transient_runtime.py +0 -0
  257. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_workflow_entry_arguments.py +0 -0
  258. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_workflow_entrypoint_validation.py +0 -0
  259. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_workflow_handler_validation.py +0 -0
  260. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_workflow_identity.py +0 -0
  261. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_workflow_result_timeout.py +0 -0
  262. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_workflow_streams.py +0 -0
  263. {durable_workflow-2.27.0 → durable_workflow-2.29.0}/tests/test_workflow_updates_conformance.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: durable-workflow
3
- Version: 2.27.0
3
+ Version: 2.29.0
4
4
  Summary: Python client and worker SDK for Durable Workflow Cloud and self-hosted Server
5
5
  Author: Durable Workflow Contributors
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "durable-workflow"
7
- version = "2.27.0"
7
+ version = "2.29.0"
8
8
  description = "Python client and worker SDK for Durable Workflow Cloud and self-hosted Server"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -82,8 +82,8 @@ durable-workflow-replay-conformance = "durable_workflow.replay_conformance:main"
82
82
  durable-workflow-workflow-updates-conformance = "durable_workflow.workflow_updates_conformance:main"
83
83
 
84
84
  [tool.durable-workflow]
85
- product-train = "2.27.0"
86
- registry-version = "2.27.0"
85
+ product-train = "2.29.0"
86
+ registry-version = "2.29.0"
87
87
  supported-server-versions = "2.8.0"
88
88
  supported-server-release-baselines = { "2" = "2.8.0", "3" = "3.0.0" }
89
89
  worker-protocol-version = "1.20"
@@ -33,7 +33,7 @@ _GROUP_FIELDS = ("parallel_group_id", "parallel_group_kind", "parallel_group_bas
33
33
  "parallel_group_size", "parallel_group_index")
34
34
  _SELECTION_FIELDS = ("selection_member_key", "selection_member_index", "selection_member_base_sequence",
35
35
  "selection_member_size", "selection_member_kind")
36
- _GroupMember = tuple[int | None, int, str, Sequence[Mapping[str, Any]] | None]
36
+ _GroupMember = tuple[int | None, int, str | int, Sequence[Mapping[str, Any]] | None]
37
37
  ENTRY_SCHEMA = "durable-workflow.worker-replay-clock/v1"
38
38
  _ENTRY_SOURCES = frozenset({"run_started_at", "redrive_replayed_started_at"})
39
39
  _ENTRY_INSTANT = re.compile(r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6}Z", re.ASCII)
@@ -234,8 +234,11 @@ def _group_payload_matches(payload: Mapping[str, Any], expected: Sequence[Mappin
234
234
  ) for field in _GROUP_FIELDS)
235
235
 
236
236
 
237
- def _group_event_time(event: Mapping[str, Any]) -> datetime | None:
238
- # Core's Activity-all path uses these model fields, not RedriveReplayClock.
237
+ def _group_event_time(event: Mapping[str, Any], *, public_history: bool = False) -> datetime | None:
238
+ # Core's settled all-group paths use these model fields.
239
+ if public_history and "recorded_at" not in event and "created_at" not in event:
240
+ # Native exports the same recorded parent-history instant as timestamp.
241
+ return _time(event.get("timestamp"))
239
242
  value = event.get("recorded_at")
240
243
  time = _time(event.get("created_at") if value is None else value)
241
244
  if "timestamp" in event and _time(event["timestamp"]) != time:
@@ -243,15 +246,17 @@ def _group_event_time(event: Mapping[str, Any]) -> datetime | None:
243
246
  return time
244
247
 
245
248
 
246
- def _activity_group_time(events: Sequence[Mapping[str, Any]], failed_member: int | None) -> datetime | None:
249
+ def _group_time(
250
+ events: Sequence[Mapping[str, Any]], failed_member: int | None, success_kind: str,
251
+ ) -> datetime | None:
247
252
  candidates: list[tuple[int, datetime, int]] = []
248
253
  for offset, event in enumerate(events):
249
- failed = _kind(event) != "ActivityCompleted"
254
+ failed = _kind(event) != success_kind
250
255
  if failed != (failed_member is not None):
251
256
  if failed:
252
257
  return None
253
258
  continue # Successful siblings do not choose the failure clock.
254
- time = _group_event_time(event)
259
+ time = _group_event_time(event, public_history=success_kind in {"TimerFired", "ChildRunCompleted"})
255
260
  milliseconds = canonical_milliseconds(time) if time is not None else None
256
261
  if time is None or milliseconds is None:
257
262
  return None
@@ -280,6 +285,7 @@ class BusinessReplayClock:
280
285
  self._by_sequence: dict[int, list[int]] = {}
281
286
  self._child_calls: dict[str, list[int]] = {}
282
287
  self._activity_executions: dict[str, list[int]] = {}
288
+ self._timer_ids: dict[str, list[int]] = {}
283
289
  self._source_run: str | None = None
284
290
  self._resume_step: int | None = None
285
291
  self._redrive_inserted: datetime | None = None
@@ -339,6 +345,9 @@ class BusinessReplayClock:
339
345
  execution = payload.get("activity_execution_id")
340
346
  if _identity(execution):
341
347
  self._activity_executions.setdefault(execution, []).append(index)
348
+ timer = payload.get("timer_id")
349
+ if _identity(timer) and _kind(event) in {"TimerScheduled", "TimerFired", "TimerCancelled"}:
350
+ self._timer_ids.setdefault(timer, []).append(index)
342
351
 
343
352
  def _start_prefix(self, index: int, payload: Mapping[str, Any]) -> bool:
344
353
  if index == 0:
@@ -404,8 +413,8 @@ class BusinessReplayClock:
404
413
  self._pending = self._current
405
414
  self._pending_entry = self._current_entry
406
415
 
407
- def observe_activity_group(
408
- self, members: Sequence[_GroupMember], failed_member: int | None, *, reconstruction: bool,
416
+ def observe_parallel_group(
417
+ self, members: Sequence[_GroupMember], failed_member: int | None, *, family: str, reconstruction: bool,
409
418
  ) -> None:
410
419
  self._pending = (None, None)
411
420
  # Core's successful query group-send supplies no new time. Body and
@@ -414,25 +423,34 @@ class BusinessReplayClock:
414
423
  return
415
424
  root = members[0][3][0]
416
425
  if (root.get("parallel_group_base_sequence") != members[0][1]
417
- or root.get("parallel_group_size") != len(members)):
426
+ or root.get("parallel_group_size") != len(members) or root.get("parallel_group_kind") != family):
418
427
  return
428
+ if family == "child":
429
+ boundary = self._child_group_boundary
430
+ identity_field, success_kind = "child_call_id", "ChildRunCompleted"
431
+ elif family == "timer":
432
+ boundary = self._timer_group_boundary
433
+ identity_field, success_kind = "timer_id", "TimerFired"
434
+ else:
435
+ boundary = self._activity_group_boundary
436
+ identity_field, success_kind = "activity_execution_id", "ActivityCompleted"
419
437
  events: list[Mapping[str, Any]] = []
420
- executions: set[str] = set()
438
+ identities: set[str] = set()
421
439
  for offset, member in enumerate(members):
422
440
  path = member[3]
423
441
  expected_root = {**root, "parallel_group_index": offset}
424
442
  if (not path or not _group_entry_matches(path[0], expected_root)
425
443
  or member[1] != members[0][1] + offset):
426
444
  return
427
- event = self._activity_group_boundary(member)
445
+ event = boundary(member)
428
446
  if event is None:
429
447
  return
430
- execution = event["payload"]["activity_execution_id"]
431
- if execution in executions:
448
+ identity = event["payload"][identity_field]
449
+ if identity in identities:
432
450
  return
433
- executions.add(execution)
451
+ identities.add(identity)
434
452
  events.append(event)
435
- self._pending = (None, _activity_group_time(events, failed_member))
453
+ self._pending = (None, _group_time(events, failed_member, success_kind))
436
454
 
437
455
  def observe_propagated_activity_failure(self, member: _GroupMember, *, reconstruction: bool) -> None:
438
456
  """Use only the qualified first-recorded failure of an explicit group."""
@@ -467,6 +485,29 @@ class BusinessReplayClock:
467
485
  return None
468
486
  return event
469
487
 
488
+ def _timer_group_boundary(self, member: _GroupMember) -> Mapping[str, Any] | None:
489
+ index, sequence, delay, path = member
490
+ indices = self._by_sequence.get(sequence, [])
491
+ if (index is None or not path or type(delay) is not int or delay < 0
492
+ or len(indices) != 2 or indices[-1] != index
493
+ or self._redrive_declared and (self._resume_step is None or sequence < self._resume_step)):
494
+ return None
495
+ opening, fired = (self.events[position] for position in indices)
496
+ if _kind(opening) != "TimerScheduled" or _kind(fired) != "TimerFired":
497
+ return None
498
+ identity = opening["payload"].get("timer_id")
499
+ if not _identity(identity) or self._timer_ids.get(identity) != indices:
500
+ return None
501
+ for row in (opening, fired):
502
+ body = row["payload"]
503
+ if (_sequence(body) != sequence or body.get("timer_id") != identity
504
+ or type(body.get("delay_seconds")) is not int or body["delay_seconds"] != delay
505
+ or body.get("timer_kind") is not None or row.get("timer_kind") is not None
506
+ or any(key in body for key in ("condition_wait_id", "signal_wait_id", *_REUSE_FIELDS))
507
+ or not _group_payload_matches(body, path)):
508
+ return None
509
+ return fired
510
+
470
511
  def observe(self, index: int | None, family: str, sequence: int) -> None:
471
512
  self._pending = (None, None)
472
513
  if index is None or not 0 <= index < len(self.events) or family not in {"activity", "timer", _CHILD_FAMILY}:
@@ -498,7 +539,18 @@ class BusinessReplayClock:
498
539
  return self._reused_time(payload, family, sequence)
499
540
  return _time(_recorded_value(event))
500
541
 
501
- def _child_boundary(self, index: int, sequence: int) -> bool:
542
+ def _child_group_boundary(self, member: _GroupMember) -> Mapping[str, Any] | None:
543
+ index, sequence, workflow_type, path = member
544
+ if (index is None or not path
545
+ or self._redrive_declared and (self._resume_step is None or sequence < self._resume_step)
546
+ or not self._child_boundary(index, sequence, path)):
547
+ return None
548
+ event = self.events[index]
549
+ return event if event["payload"]["child_workflow_type"] == workflow_type else None
550
+
551
+ def _child_boundary(
552
+ self, index: int, sequence: int, path: Sequence[Mapping[str, Any]] | None = None,
553
+ ) -> bool:
502
554
  indices = self._by_sequence.get(sequence, [])
503
555
  if len(indices) not in (2, 3) or indices[-1] != index:
504
556
  return False
@@ -514,14 +566,19 @@ class BusinessReplayClock:
514
566
  return False
515
567
  if self._child_calls.get(payload["child_call_id"]) != indices:
516
568
  return False
517
- return all(self._child_row(position, payload) for position in indices)
569
+ return all(self._child_row(position, sequence, payload, path) for position in indices)
518
570
 
519
- def _child_row(self, index: int, terminal: Mapping[str, Any]) -> bool:
571
+ def _child_row(
572
+ self, index: int, sequence: int, terminal: Mapping[str, Any], path: Sequence[Mapping[str, Any]] | None,
573
+ ) -> bool:
520
574
  payload = self.events[index].get("payload")
521
- return (self._scalar_row(index, _CHILD_FAMILY, "child_call_id", terminal["child_call_id"], _CHILD_EVENTS)
522
- and isinstance(payload, Mapping)
523
- and payload.get("workflow_type", terminal["child_workflow_type"]) == terminal["child_workflow_type"]
524
- and all(payload.get(key) == terminal[key] for key in _CHILD_IDENTITIES))
575
+ if (not isinstance(payload, Mapping) or _sequence(payload) != sequence
576
+ or payload.get("workflow_type", terminal["child_workflow_type"]) != terminal["child_workflow_type"]
577
+ or any(payload.get(key) != terminal[key] for key in _CHILD_IDENTITIES)):
578
+ return False
579
+ if path is not None:
580
+ return _group_payload_matches(payload, path)
581
+ return self._scalar_row(index, _CHILD_FAMILY, "child_call_id", terminal["child_call_id"], _CHILD_EVENTS)
525
582
 
526
583
  def _reused_time(self, payload: Mapping[str, Any], family: str, sequence: int) -> datetime | None:
527
584
  if (self._source_run is None or payload.get("reused_from_run_id") != self._source_run
@@ -8965,10 +8965,10 @@ def _replay_state(
8965
8965
  except StopIteration as stop:
8966
8966
  return _terminal_state(stop.value, include_pending=False)
8967
8967
  if all(isinstance(leaf, ScheduleActivity) for leaf in cmd):
8968
- ctx._business_clock.observe_activity_group(
8968
+ ctx._business_clock.observe_parallel_group(
8969
8969
  [(step.history_index, step.workflow_sequence, leaf.activity_type, leaf._parallel_group_path)
8970
8970
  for step, leaf in zip(consumed_steps, cmd, strict=True)],
8971
- None, reconstruction=reconstruction_only,
8971
+ None, family="activity", reconstruction=reconstruction_only,
8972
8972
  )
8973
8973
  else:
8974
8974
  ctx._business_clock.unavailable()
@@ -9018,10 +9018,27 @@ def _replay_state(
9018
9018
  (offset for offset, value in enumerate(vals) if failed is not None and value is failed),
9019
9019
  None,
9020
9020
  )
9021
- ctx._business_clock.observe_activity_group(
9021
+ ctx._business_clock.observe_parallel_group(
9022
9022
  [(step.history_index, step.workflow_sequence, leaf.activity_type, leaf._parallel_group_path)
9023
9023
  for step, leaf in zip(consumed_steps, cmd, strict=True)],
9024
- selected_failure, reconstruction=reconstruction_only,
9024
+ selected_failure, family="activity", reconstruction=reconstruction_only,
9025
+ )
9026
+ elif (group_typed_failure is None and failed is None
9027
+ and all(isinstance(leaf, StartTimer) for leaf in cmd)):
9028
+ ctx._business_clock.observe_parallel_group(
9029
+ [(step.history_index, step.workflow_sequence, leaf.delay_seconds, leaf._parallel_group_path)
9030
+ for step, leaf in zip(consumed_steps, cmd, strict=True)],
9031
+ None, family="timer", reconstruction=reconstruction_only,
9032
+ )
9033
+ elif group_typed_failure is None and all(isinstance(leaf, StartChildWorkflow) for leaf in cmd):
9034
+ selected_failure = next(
9035
+ (offset for offset, value in enumerate(vals) if failed is not None and value is failed),
9036
+ None,
9037
+ )
9038
+ ctx._business_clock.observe_parallel_group(
9039
+ [(step.history_index, step.workflow_sequence, leaf.workflow_type, leaf._parallel_group_path)
9040
+ for step, leaf in zip(consumed_steps, cmd, strict=True)],
9041
+ selected_failure, family="child", reconstruction=reconstruction_only,
9025
9042
  )
9026
9043
  else:
9027
9044
  ctx._business_clock.unavailable()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: durable-workflow
3
- Version: 2.27.0
3
+ Version: 2.29.0
4
4
  Summary: Python client and worker SDK for Durable Workflow Cloud and self-hosted Server
5
5
  Author: Durable Workflow Contributors
6
6
  License-Expression: MIT
@@ -14,8 +14,13 @@ from durable_workflow import serializer, workflow
14
14
  from durable_workflow.errors import ActivityFailed, NonDeterministicReplayError, TypedValueError
15
15
  from durable_workflow.replay_clock_math import canonical_milliseconds, from_canonical_milliseconds
16
16
  from durable_workflow.workflow import WorkflowContext, query_state, replay
17
- from tests.business_clock_workflows import clock_text
17
+ from tests.business_clock_workflows import (
18
+ ParallelChildBusinessClockWorkflow,
19
+ ParallelTimerBusinessClockWorkflow,
20
+ clock_text,
21
+ )
18
22
  from tests.test_business_replay_clock import result
23
+ from tests.test_business_replay_clock_child import child_rows
19
24
 
20
25
  START = "2026-01-01T00:00:00.000000+00:00"
21
26
  FIRST = "2026-01-01T00:00:03.123100+00:00"
@@ -153,6 +158,148 @@ class ParallelProbe:
153
158
  return self.time
154
159
 
155
160
 
161
+ def timer_group_history(order: tuple[int, int] = (0, 1), times: list[str] | None = None) -> list[dict[str, Any]]:
162
+ rows = history(times, order=order)
163
+ for row in rows[1:]:
164
+ sequence = row["payload"]["sequence"]
165
+ path = [{**group_path(1, 2, sequence - 1)[0], "parallel_group_id": "parallel-timers:1:2",
166
+ "parallel_group_kind": "timer"}]
167
+ row["event_type"] = "TimerScheduled" if row["event_type"] == "ActivityScheduled" else "TimerFired"
168
+ row["payload"] = {"timer_id": f"timer-{sequence}", "sequence": sequence, "delay_seconds": sequence,
169
+ **path[0], "parallel_group_path": path}
170
+ return rows
171
+
172
+
173
+ @pytest.mark.parametrize("order", [(0, 1), (1, 0)])
174
+ def test_timer_group_uses_the_first_authored_timer_on_a_canonical_tie(order: tuple[int, int]) -> None:
175
+ rows = timer_group_history(order)
176
+ rows.append({"event_type": "WorkflowTaskCompleted", "recorded_at": "2099-01-01T00:00:00Z", "payload": {}})
177
+ original = deepcopy(rows)
178
+ assert result(rows, ParallelTimerBusinessClockWorkflow) == [[None, None], FIRST, FIRST]
179
+ assert result(rows, ParallelTimerBusinessClockWorkflow) == [[None, None], FIRST, FIRST]
180
+ assert query_state(ParallelTimerBusinessClockWorkflow, rows, [], "body-clock", payload_codec="avro") is None
181
+ assert rows == original
182
+
183
+
184
+ def test_timer_group_selects_the_later_timer_even_when_it_was_recorded_first() -> None:
185
+ later = "2026-01-01T00:00:03.123500+00:00"
186
+ rows = timer_group_history((1, 0), [FIRST, later])
187
+ assert result(rows, ParallelTimerBusinessClockWorkflow) == [[None, None], later, later]
188
+
189
+
190
+ def test_exported_timer_history_supplies_the_same_clock_as_worker_history() -> None:
191
+ rows = timer_group_history()
192
+ for row in rows[1:]:
193
+ row["timestamp"] = row.pop("recorded_at")
194
+ assert result(rows, ParallelTimerBusinessClockWorkflow) == [[None, None], FIRST, FIRST]
195
+ rows[-1]["recorded_at"] = "2099-01-01T00:00:00Z"
196
+ assert result(rows, ParallelTimerBusinessClockWorkflow) == [[None, None], None, None]
197
+
198
+
199
+ @pytest.mark.parametrize("field,value", [("timer_id", "different-timer"), ("timer_kind", "unexpected"),
200
+ ("reused_recorded_at", FIRST)])
201
+ def test_unproved_timer_group_keeps_its_results_without_certifying_time(field: str, value: str) -> None:
202
+ rows = timer_group_history()
203
+ rows[-1]["payload"][field] = value
204
+ assert result(rows, ParallelTimerBusinessClockWorkflow) == [[None, None], None, None]
205
+
206
+
207
+ def child_group_history(
208
+ times: list[str] | None = None, *, order: tuple[int, ...] = (1, 0),
209
+ failures: dict[int, str] | None = None, nested: bool = False,
210
+ ) -> list[dict[str, Any]]:
211
+ times = [FIRST, TIED] if times is None else times
212
+ rows: list[dict[str, Any]] = [{"event_type": "WorkflowStarted", "recorded_at": START, "payload": {}}]
213
+ terminals = []
214
+ for offset, time in enumerate(times):
215
+ kind = (failures or {}).get(offset, "ChildRunCompleted")
216
+ lifecycle = child_rows(offset + 1, kind, time)
217
+ path = [
218
+ {**entry, "parallel_group_kind": "child",
219
+ "parallel_group_id": entry["parallel_group_id"].replace("parallel-activities:", "parallel-children:")}
220
+ for entry in group_path(1, len(times), offset, nested=nested)
221
+ ]
222
+ for row in lifecycle:
223
+ row["payload"].update(deepcopy(path[-1]), parallel_group_path=deepcopy(path))
224
+ if kind == "ChildRunCompleted":
225
+ lifecycle[-1]["payload"]["result"] = serializer.envelope(f"child-value-{offset}")
226
+ rows.extend(lifecycle[:-1])
227
+ terminals.append(lifecycle[-1])
228
+ rows.extend(terminals[offset] for offset in order)
229
+ return rows
230
+
231
+
232
+ @pytest.mark.parametrize("order", [(0, 1), (1, 0)])
233
+ def test_child_group_preserves_authored_ties_and_excludes_later_history(order: tuple[int, ...]) -> None:
234
+ rows = child_group_history(order=order)
235
+ rows.append({"event_type": "WorkflowTaskCompleted", "recorded_at": "2099-01-01T00:00:00Z", "payload": {}})
236
+ original = deepcopy(rows)
237
+ wanted = {"values": ["child-value-0", "child-value-1"], "failure": None, "clock": FIRST, "repeated": FIRST}
238
+ assert result(rows, ParallelChildBusinessClockWorkflow) == wanted
239
+ assert result(rows, ParallelChildBusinessClockWorkflow) == wanted
240
+ assert rows == original
241
+ for query in ("clock", "body-clock"):
242
+ assert query_state(ParallelChildBusinessClockWorkflow, rows, [], query, payload_codec="avro") is None
243
+
244
+
245
+ def test_nested_child_group_uses_the_latest_consumed_member_from_public_history() -> None:
246
+ class Nested(ParallelChildBusinessClockWorkflow):
247
+ size = 3
248
+ nested = True
249
+
250
+ later = "2026-01-01T00:00:03.123500+00:00"
251
+ rows = child_group_history([FIRST, TIED, later], order=(2, 1, 0), nested=True)
252
+ for row in rows[1:]:
253
+ row["timestamp"] = row.pop("recorded_at")
254
+ observed = result(rows, Nested)
255
+ assert observed == {"values": ["child-value-0", ["child-value-1", "child-value-2"]],
256
+ "failure": None, "clock": later, "repeated": later}
257
+ rows[-3]["recorded_at"] = FIRST
258
+ assert result(rows, Nested) == {**observed, "clock": None, "repeated": None}
259
+
260
+
261
+ @pytest.mark.parametrize(("terminal", "failure_kind"), [
262
+ ("ChildRunFailed", "child_workflow"), ("ChildRunCancelled", "cancelled"), ("ChildRunTerminated", "terminated"),
263
+ ])
264
+ def test_child_group_failure_keeps_its_exception_and_clock(terminal: str, failure_kind: str) -> None:
265
+ rows = child_group_history([FIRST, "2099-01-01T00:00:00Z"], failures={0: terminal})
266
+ clock = "2026-01-01T00:00:03.123000+00:00"
267
+ observed = result(rows, ParallelChildBusinessClockWorkflow)
268
+ assert observed == {"values": None, "failure": [failure_kind, "run-1", "recorded child failure"],
269
+ "clock": clock, "repeated": clock}
270
+
271
+
272
+ def test_child_group_keeps_legacy_failure_when_a_different_member_would_set_the_clock() -> None:
273
+ later = "2026-01-01T00:00:03.130000+00:00"
274
+ rows = child_group_history([later, FIRST], failures={0: "ChildRunFailed", 1: "ChildRunFailed"})
275
+ assert result(rows, ParallelChildBusinessClockWorkflow) == {
276
+ "values": None, "failure": ["child_workflow", "run-1", "recorded child failure"],
277
+ "clock": None, "repeated": None,
278
+ }
279
+
280
+
281
+ @pytest.mark.parametrize(("field", "replacement"), [
282
+ ("child_workflow_run_id", "unexpected-run"), ("child_call_id", "unexpected-call"),
283
+ ("child_workflow_instance_id", "unexpected-instance"), ("parallel_group_path", []),
284
+ ])
285
+ def test_unproved_child_lifecycle_preserves_results_without_clock(field: str, replacement: Any) -> None:
286
+ rows = child_group_history()
287
+ if field == "parallel_group_path":
288
+ rows[1]["payload"].pop("parallel_group_id")
289
+ rows[1]["payload"][field] = replacement
290
+ assert result(rows, ParallelChildBusinessClockWorkflow) == {
291
+ "values": ["child-value-0", "child-value-1"], "failure": None, "clock": None, "repeated": None,
292
+ }
293
+
294
+
295
+ def test_two_different_child_calls_can_share_the_target_run() -> None:
296
+ rows = child_group_history()
297
+ for row in rows[1:]:
298
+ if row["payload"]["sequence"] == 2:
299
+ row["payload"].update(child_workflow_instance_id="child-1", child_workflow_run_id="run-1")
300
+ assert result(rows, ParallelChildBusinessClockWorkflow)["clock"] == FIRST
301
+
302
+
156
303
  @pytest.mark.parametrize("order", [(0, 1), (1, 0)])
157
304
  def test_success_uses_authored_tie_order_and_full_precision_not_arrival_or_history_max(order: tuple[int, ...]) -> None:
158
305
  rows = history(order=order)
@@ -38,7 +38,9 @@ from tests.business_clock_workflows import (
38
38
  EmptyGroupEntryWorkflow,
39
39
  NativeRedriveBusinessClockWorkflow,
40
40
  ParallelActivityBusinessClockWorkflow,
41
+ ParallelChildBusinessClockWorkflow,
41
42
  ParallelFailureBusinessClockWorkflow,
43
+ ParallelTimerBusinessClockWorkflow,
42
44
  PrefixedCoreTimerBusinessClockWorkflow,
43
45
  ScalarBusinessClockWorkflow,
44
46
  TolerantEntryWorkflow,
@@ -462,7 +464,9 @@ WORKFLOWS = [
462
464
  ChildBusinessClockWorkflow,
463
465
  CyclicFinalizerBusinessClockWorkflow,
464
466
  ParallelActivityBusinessClockWorkflow,
467
+ ParallelChildBusinessClockWorkflow,
465
468
  ParallelFailureBusinessClockWorkflow,
469
+ ParallelTimerBusinessClockWorkflow,
466
470
  NativeRedriveBusinessClockWorkflow,
467
471
  PrefixedCoreTimerBusinessClockWorkflow,
468
472
  ScalarBusinessClockWorkflow,