durable-workflow 2.29.0__tar.gz → 2.31.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.
- {durable_workflow-2.29.0/src/durable_workflow.egg-info → durable_workflow-2.31.0}/PKG-INFO +1 -1
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/pyproject.toml +3 -3
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/replay_clock.py +130 -25
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/workflow.py +66 -44
- {durable_workflow-2.29.0 → durable_workflow-2.31.0/src/durable_workflow.egg-info}/PKG-INFO +1 -1
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow.egg-info/SOURCES.txt +2 -0
- durable_workflow-2.31.0/tests/test_business_replay_clock_condition.py +283 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_business_replay_clock_parallel.py +81 -13
- durable_workflow-2.31.0/tests/test_business_replay_clock_selection.py +111 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_replay_clock.py +17 -8
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_replay_regression_corpus.py +6 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/LICENSE +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/README.md +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/setup.cfg +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/__init__.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_activity_checkpoint.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_activity_lease.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_activity_process.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_avro.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_cancellation_scope.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_cancellation_scope_history.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_capabilities_digest.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_condition_fingerprint.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_condition_input_order.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_continue_as_new.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_cooperative_cancellation.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_failure_reporting.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_metric_routes.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_parallel_group_policy.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_payload_protection.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_poll_transport.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_prepared_local_activity.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_query_task_authority.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_response_limit.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_sticky_workflow_cache.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_timeout_cleanup.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/_typed_values.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/activity.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/auth_composition.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/cancellation.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/client.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/errors.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/external_storage.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/external_task_input.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/external_task_result.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/history_bundle_verify.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/interceptors.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/invocable.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/metrics.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/nexus.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/prepared_payload.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/py.typed +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/python_conformance.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/replay_clock_math.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/replay_conformance.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/replay_verify.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/retry_policy.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/serializer.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/server_compatibility.json +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/sync.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/telemetry.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/telemetry_carrier.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/testing.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/worker.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/worker_session.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/worker_status.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow/workflow_updates_conformance.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow.egg-info/dependency_links.txt +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow.egg-info/entry_points.txt +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow.egg-info/requires.txt +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow.egg-info/top_level.txt +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_acceptance_authority.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_acceptance_consumer.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_acceptance_entry.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_cancellation_policies.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_checkpoint.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_context.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_exponential_retry.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_heartbeat_authority.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_heartbeat_unavailable.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_identity.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_install_inventory.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_lease_authority.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_lease_renewal.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_lease_worker.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_process.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_retry_cap_cell.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_retry_info.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_run_closed_refusal.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_activity_worker_lost.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_auth_composition.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_avro_value_benchmark.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_avro_value_protocol.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_business_replay_clock.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_business_replay_clock_child.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_business_replay_clock_entry.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_business_replay_clock_query_attestation.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_business_replay_clock_redrive.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_business_replay_clock_sequence_claims.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_cancellation_cause.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_cancellation_context.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_cancellation_remaining_time.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_cancellation_scope_admission.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_cancellation_scope_authoring.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_cancellation_scope_boundary.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_cancellation_scope_opening.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_capabilities_digest.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_capabilities_digest_unknown.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_checkpointed_batch_example.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_child_workflow_policies.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_ci_checkout.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_ci_integration_endpoint.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_client.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_client_iterators.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_client_payload_protection.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_client_telemetry.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_client_timeouts.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_coalescing_signal_timer_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_codec_regression_corpus.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_command_keys_acceptance.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_command_keys_captured_inputs.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_command_keys_container_ownership.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_command_keys_workspace.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_committed_cancellation_scope_descendants.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_committed_cancellation_scope_groups.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_committed_cancellation_scope_history.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_committed_cancellation_scope_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_completion_size_limit.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_condition_fingerprint.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_condition_occurrence_id.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_condition_replay_drift.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_continue_as_new_target.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_control_plane_parity_fixtures.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_cooperative_cancellation.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_cooperative_cancellation_client.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_cooperative_cancellation_worker.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_cooperative_remote_worker.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_docs_release_channel.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_docstring_cross_references.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_durable_selection.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_empty_callback_failure.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_errors.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_external_storage.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_external_task_input.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_external_task_result.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_failure_reporting.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_generator_lifecycle.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_golden_history_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_history_bundle_pruned.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_history_bundle_schema2.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_history_bundle_verify.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_history_event_contract.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_invocable.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_local_activity_backoff.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_local_failure_reporting.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_message_streams.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_metric_routes.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_metrics.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_native_timer_redrive_cell.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_native_timer_redrive_clock.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_nexus_durable_wait.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_nexus_namespace.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_nexus_wire.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_order_processing_example.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_ordered_condition_input.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_parallel_completion_order_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_parallel_failure_order.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_parallel_group_boundaries.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_parallel_group_policy.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_parallel_member_failure_open_siblings.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_parallel_saga_authoring.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_patch_history.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_payload_policy_refresh.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_payload_protection.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_pending_operation_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_physical_command_key_readback.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_poll_failure_backoff.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_poll_transport.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_portal_source_split.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_prepared_local_activity_client.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_prepared_local_activity_groups.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_prepared_local_activity_policies.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_prepared_local_activity_worker.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_protected_workflow_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_public_boundary_scanner.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_publish_workflow_isolation.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_published_activity_acceptance.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_published_pagination_evidence.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_pypi_project_surface.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_python_conformance.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_queries.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_query_task_authority.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_query_timeout_retry.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_quiesced_snapshot.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_readme_quickstart.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_redrive_call_ledger.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_redrive_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_redrive_successor_evidence.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_registration_ambiguity.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_release_metadata.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_release_promotion.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_replay_conformance.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_replay_verify.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_response_body_limit.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_result_continue_as_new.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_retry_cap_download.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_retry_cap_workflow.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_retry_policy.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_run_activities.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_run_cancellation_scope_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_run_closed_settlement_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_runtime_external_payload_transport.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_schedule_origin.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_schedules.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_scoped_run_cancellation_context.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_sdk_metrics_contract.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_search_attribute_replay_identity.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_serializer.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_signal_external_workflow.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_signal_with_start.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_signals.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_sleep.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_standalone_activity_client.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_static_credential_validation.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_sticky_execution.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_sticky_history_suffix.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_storage_admission.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_sync.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_sync_activities.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_synthetic_command_key_readback.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_telemetry.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_telemetry_carrier.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_testing_failures.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_testing_harness.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_testing_nexus.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_threaded_heartbeat_example.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_timeout_cleanup.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_tls_trust.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_transport_diagnostics.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_typed_values.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_typed_workflow_values.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_update_outcome.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_update_signal_condition_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_updates.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_wait_condition.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_worker.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_worker_deregistration.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_worker_observation.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_worker_session.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_worker_startup_buffered.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_worker_startup_raw.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_worker_startup_read_budget.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_worker_startup_snapshot.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_worker_status.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_worker_telemetry_wire.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_worker_transient_5xx_retry.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_worker_transient_runtime.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_workflow_entry_arguments.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_workflow_entrypoint_validation.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_workflow_handler_validation.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_workflow_identity.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_workflow_result_timeout.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_workflow_streams.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.31.0}/tests/test_workflow_updates_conformance.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "durable-workflow"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.31.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.
|
|
86
|
-
registry-version = "2.
|
|
85
|
+
product-train = "2.31.0"
|
|
86
|
+
registry-version = "2.31.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"
|
|
@@ -14,6 +14,7 @@ from dataclasses import dataclass
|
|
|
14
14
|
from datetime import datetime, timezone
|
|
15
15
|
from typing import Any, ParamSpec, TypeGuard, TypeVar
|
|
16
16
|
|
|
17
|
+
from ._condition_input_order import marked as _ordered_condition
|
|
17
18
|
from .errors import ReplayClockUnavailable
|
|
18
19
|
from .replay_clock_math import canonical_milliseconds, from_canonical_milliseconds
|
|
19
20
|
|
|
@@ -37,6 +38,11 @@ _GroupMember = tuple[int | None, int, str | int, Sequence[Mapping[str, Any]] | N
|
|
|
37
38
|
ENTRY_SCHEMA = "durable-workflow.worker-replay-clock/v1"
|
|
38
39
|
_ENTRY_SOURCES = frozenset({"run_started_at", "redrive_replayed_started_at"})
|
|
39
40
|
_ENTRY_INSTANT = re.compile(r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6}Z", re.ASCII)
|
|
41
|
+
_CONDITION_ROWS = frozenset({
|
|
42
|
+
"ConditionWaitOpened", "ConditionWaitSatisfied", "ConditionWaitTimedOut", "ConditionWaitCancelled",
|
|
43
|
+
"TimerScheduled", "TimerFired", "TimerCancelled",
|
|
44
|
+
})
|
|
45
|
+
_SCALAR_GROUP_FIELDS = ("parallel_group", "parallel_group_id", "selection_group", *_SELECTION_FIELDS)
|
|
40
46
|
|
|
41
47
|
|
|
42
48
|
@dataclass(frozen=True)
|
|
@@ -247,16 +253,23 @@ def _group_event_time(event: Mapping[str, Any], *, public_history: bool = False)
|
|
|
247
253
|
|
|
248
254
|
|
|
249
255
|
def _group_time(
|
|
250
|
-
events: Sequence[Mapping[str, Any]], failed_member: int | None,
|
|
256
|
+
events: Sequence[tuple[Mapping[str, Any], str]], failed_member: int | None,
|
|
251
257
|
) -> datetime | None:
|
|
252
258
|
candidates: list[tuple[int, datetime, int]] = []
|
|
253
|
-
for offset, event in enumerate(events):
|
|
259
|
+
for offset, (event, success_kind) in enumerate(events):
|
|
254
260
|
failed = _kind(event) != success_kind
|
|
255
261
|
if failed != (failed_member is not None):
|
|
256
262
|
if failed:
|
|
257
263
|
return None
|
|
258
264
|
continue # Successful siblings do not choose the failure clock.
|
|
259
|
-
|
|
265
|
+
# Native's public history projects recorded_at as timestamp for every
|
|
266
|
+
# event type. A bare activity timestamp without that row shape is
|
|
267
|
+
# still insufficient to prove the consumed instant.
|
|
268
|
+
sequence = event.get("sequence")
|
|
269
|
+
native_export = type(sequence) is int and sequence > 0 and "principal" in event
|
|
270
|
+
time = _group_event_time(
|
|
271
|
+
event, public_history=native_export or success_kind in {"TimerFired", "ChildRunCompleted"},
|
|
272
|
+
)
|
|
260
273
|
milliseconds = canonical_milliseconds(time) if time is not None else None
|
|
261
274
|
if time is None or milliseconds is None:
|
|
262
275
|
return None
|
|
@@ -311,6 +324,9 @@ class BusinessReplayClock:
|
|
|
311
324
|
# group carries it into the next resume without consuming history.
|
|
312
325
|
self._pending_entry = True
|
|
313
326
|
self._current_entry = False
|
|
327
|
+
# What the last resumed segment could read when it yielded. A condition
|
|
328
|
+
# wait that consumes no clock boundary resumes with exactly this value.
|
|
329
|
+
self._yielded: tuple[tuple[int | None, datetime | None], bool] = ((None, None), False)
|
|
314
330
|
# A query or validation rebuild whose task does not attest the entry
|
|
315
331
|
# carrier cannot know what the workflow task's entry read returned.
|
|
316
332
|
self.entry_unattested = False
|
|
@@ -392,6 +408,7 @@ class BusinessReplayClock:
|
|
|
392
408
|
self._current, self._pending = self._pending, (None, None)
|
|
393
409
|
entry, self._pending_entry = self._pending_entry, False
|
|
394
410
|
self._current_entry = entry
|
|
411
|
+
self._yielded = (self._current, entry)
|
|
395
412
|
with execution_scope(owner, self._current[1], entry=entry):
|
|
396
413
|
return function(*args)
|
|
397
414
|
|
|
@@ -413,44 +430,132 @@ class BusinessReplayClock:
|
|
|
413
430
|
self._pending = self._current
|
|
414
431
|
self._pending_entry = self._current_entry
|
|
415
432
|
|
|
433
|
+
def keep_condition_prior(self) -> None:
|
|
434
|
+
"""A satisfied or non-advancing condition resumes with its yield's value.
|
|
435
|
+
|
|
436
|
+
External workers' Servers record ``ConditionWaitSatisfied`` and an
|
|
437
|
+
ordered timeout only when the resuming task completes, after workflow
|
|
438
|
+
code has run. Neither time exists on the first execution, so neither
|
|
439
|
+
is read on replay: the clock keeps what the waiting code last saw,
|
|
440
|
+
including an unavailable value and its entry attestation.
|
|
441
|
+
"""
|
|
442
|
+
self._pending, self._pending_entry = self._yielded
|
|
443
|
+
|
|
444
|
+
def observe_condition_timeout(self, wait_id: Any, *, reconstruction: bool) -> None:
|
|
445
|
+
"""Use the condition-timeout ``TimerFired`` that ended this physical wait.
|
|
446
|
+
|
|
447
|
+
The Server records that fire before the resuming task, so the first
|
|
448
|
+
execution and every replay read the same instant. A Core
|
|
449
|
+
``ConditionWaitTimedOut`` is accepted only at that same instant;
|
|
450
|
+
another time, like an ordered-input timeout the worker resolved
|
|
451
|
+
itself, keeps the prior value. Unproved evidence is unavailable.
|
|
452
|
+
"""
|
|
453
|
+
self._pending, self._pending_entry = (None, None), False
|
|
454
|
+
if not _identity(wait_id):
|
|
455
|
+
return
|
|
456
|
+
rows: dict[str, list[int]] = {}
|
|
457
|
+
for index, event in enumerate(self.events):
|
|
458
|
+
payload = event.get("payload")
|
|
459
|
+
if isinstance(payload, Mapping) and payload.get("condition_wait_id") == wait_id:
|
|
460
|
+
kind = _kind(event)
|
|
461
|
+
if kind not in _CONDITION_ROWS:
|
|
462
|
+
return
|
|
463
|
+
rows.setdefault(kind, []).append(index)
|
|
464
|
+
opened, scheduled, fired, timed_out = (rows.get(kind, []) for kind in (
|
|
465
|
+
"ConditionWaitOpened", "TimerScheduled", "TimerFired", "ConditionWaitTimedOut"))
|
|
466
|
+
if (len(opened) != 1 or len(scheduled) != 1 or len(fired) != 1 or len(timed_out) > 1
|
|
467
|
+
or any(rows.get(kind) for kind in ("ConditionWaitSatisfied", "ConditionWaitCancelled", "TimerCancelled"))
|
|
468
|
+
or not opened[0] < scheduled[0] < fired[0] or timed_out and timed_out[0] < fired[0]):
|
|
469
|
+
return
|
|
470
|
+
opening = self.events[opened[0]]["payload"]
|
|
471
|
+
sequence = _sequence(opening)
|
|
472
|
+
timer = self.events[scheduled[0]]["payload"].get("timer_id")
|
|
473
|
+
if sequence is None or not _identity(timer):
|
|
474
|
+
return
|
|
475
|
+
for index in (*opened, *scheduled, *fired, *timed_out):
|
|
476
|
+
body = self.events[index]["payload"]
|
|
477
|
+
is_timer = _kind(self.events[index]) in ("TimerScheduled", "TimerFired")
|
|
478
|
+
if (_sequence(body) != sequence or any(key in body for key in _REUSE_FIELDS)
|
|
479
|
+
or any(body.get(field) is not None for field in _SCALAR_GROUP_FIELDS)
|
|
480
|
+
or body.get("parallel_group_path") not in (None, [])
|
|
481
|
+
or body.get("cancellation_scope_id") not in (None, "root")
|
|
482
|
+
or (is_timer and (body.get("timer_kind") != "condition_timeout" or body.get("timer_id") != timer))
|
|
483
|
+
or (not is_timer and "timer_id" in body and body["timer_id"] != timer)):
|
|
484
|
+
return
|
|
485
|
+
if self._redrive_declared and (self._resume_step is None or sequence < self._resume_step):
|
|
486
|
+
return
|
|
487
|
+
if _ordered_condition(opening):
|
|
488
|
+
self.keep_condition_prior()
|
|
489
|
+
return
|
|
490
|
+
time = _time(_recorded_value(self.events[fired[0]]))
|
|
491
|
+
if time is None:
|
|
492
|
+
return
|
|
493
|
+
if timed_out:
|
|
494
|
+
if _time(_recorded_value(self.events[timed_out[0]])) != time:
|
|
495
|
+
self.keep_condition_prior()
|
|
496
|
+
return
|
|
497
|
+
elif reconstruction:
|
|
498
|
+
# Core's query replay needs the explicit resolution; a fire alone
|
|
499
|
+
# grants no callback authority there.
|
|
500
|
+
return
|
|
501
|
+
self._pending = (None, time)
|
|
502
|
+
|
|
503
|
+
def observe_selection(self, marker_index: int, terminal_index: int | None, base_sequence: int) -> None:
|
|
504
|
+
"""Use the matched decision when it follows its unique winner terminal."""
|
|
505
|
+
self._pending = (None, None)
|
|
506
|
+
if terminal_index is None or terminal_index >= marker_index:
|
|
507
|
+
return
|
|
508
|
+
if self._redrive_declared and (self._resume_step is None or base_sequence < self._resume_step):
|
|
509
|
+
return
|
|
510
|
+
marker = self.events[marker_index]
|
|
511
|
+
payload = marker["payload"]
|
|
512
|
+
if (_kind(marker) != "SelectionResolved" or any(key in payload for key in _REUSE_FIELDS)
|
|
513
|
+
or _kind(self.events[terminal_index]) != payload.get("resolution_event_type")):
|
|
514
|
+
return
|
|
515
|
+
self._pending = (marker_index, _time(_recorded_value(marker)))
|
|
516
|
+
|
|
416
517
|
def observe_parallel_group(
|
|
417
|
-
self, members: Sequence[_GroupMember], failed_member: int | None, *,
|
|
518
|
+
self, members: Sequence[tuple[str, _GroupMember]], failed_member: int | None, *, reconstruction: bool,
|
|
418
519
|
) -> None:
|
|
419
520
|
self._pending = (None, None)
|
|
420
521
|
# Core's successful query group-send supplies no new time. Body and
|
|
421
522
|
# callback reconstruction cannot borrow an executor-only aggregate.
|
|
422
|
-
if reconstruction or not members
|
|
523
|
+
if reconstruction or not members:
|
|
524
|
+
return
|
|
525
|
+
_, first = members[0]
|
|
526
|
+
first_path = first[3]
|
|
527
|
+
if not first_path:
|
|
423
528
|
return
|
|
424
|
-
root =
|
|
425
|
-
|
|
426
|
-
|
|
529
|
+
root = first_path[0]
|
|
530
|
+
families = {family for family, _ in members}
|
|
531
|
+
group_kind = next(iter(families)) if len(families) == 1 else "mixed"
|
|
532
|
+
if (root.get("parallel_group_base_sequence") != first[1]
|
|
533
|
+
or root.get("parallel_group_size") != len(members) or root.get("parallel_group_kind") != group_kind):
|
|
427
534
|
return
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
events: list[Mapping[str, Any]] = []
|
|
438
|
-
identities: set[str] = set()
|
|
439
|
-
for offset, member in enumerate(members):
|
|
535
|
+
boundaries = {
|
|
536
|
+
"activity": (self._activity_group_boundary, "activity_execution_id", "ActivityCompleted"),
|
|
537
|
+
"timer": (self._timer_group_boundary, "timer_id", "TimerFired"),
|
|
538
|
+
"child": (self._child_group_boundary, "child_call_id", "ChildRunCompleted"),
|
|
539
|
+
}
|
|
540
|
+
events: list[tuple[Mapping[str, Any], str]] = []
|
|
541
|
+
identities: set[tuple[str, str]] = set()
|
|
542
|
+
for offset, (family, member) in enumerate(members):
|
|
543
|
+
proof = boundaries.get(family)
|
|
440
544
|
path = member[3]
|
|
441
545
|
expected_root = {**root, "parallel_group_index": offset}
|
|
442
|
-
if (not path or not _group_entry_matches(path[0], expected_root)
|
|
443
|
-
or member[1] !=
|
|
546
|
+
if (proof is None or not path or not _group_entry_matches(path[0], expected_root)
|
|
547
|
+
or member[1] != first[1] + offset):
|
|
444
548
|
return
|
|
549
|
+
boundary, identity_field, success_kind = proof
|
|
445
550
|
event = boundary(member)
|
|
446
551
|
if event is None:
|
|
447
552
|
return
|
|
448
|
-
identity = event["payload"][identity_field]
|
|
553
|
+
identity = family, event["payload"][identity_field]
|
|
449
554
|
if identity in identities:
|
|
450
555
|
return
|
|
451
556
|
identities.add(identity)
|
|
452
|
-
events.append(event)
|
|
453
|
-
self._pending = (None, _group_time(events, failed_member
|
|
557
|
+
events.append((event, success_kind))
|
|
558
|
+
self._pending = (None, _group_time(events, failed_member))
|
|
454
559
|
|
|
455
560
|
def observe_propagated_activity_failure(self, member: _GroupMember, *, reconstruction: bool) -> None:
|
|
456
561
|
"""Use only the qualified first-recorded failure of an explicit group."""
|
|
@@ -3335,8 +3335,13 @@ class WorkflowContext:
|
|
|
3335
3335
|
"""Return the proved UTC instant of the supported consumed boundary.
|
|
3336
3336
|
|
|
3337
3337
|
This additive clock supports scalar persisted activities, timers and
|
|
3338
|
-
children, explicit redrive start,
|
|
3339
|
-
|
|
3338
|
+
children, explicit redrive start, validated selection decisions, and
|
|
3339
|
+
remote groups of activities, timers and children, including mixed
|
|
3340
|
+
groups. A selection uses its recorded decision instant. A satisfied
|
|
3341
|
+
``wait_condition`` keeps the value read before the wait, and a
|
|
3342
|
+
condition timeout reads its recorded condition-timeout timer fire.
|
|
3343
|
+
Group success
|
|
3344
|
+
retains the selected event's full precision;
|
|
3340
3345
|
matching caught failure uses canonical-v1 integer milliseconds.
|
|
3341
3346
|
Ordinary entry reads the run's canonical start from the workflow
|
|
3342
3347
|
task's ``replay_clock`` carrier (``WorkerReplayClock`` v1). Entry is
|
|
@@ -5978,9 +5983,12 @@ def _replay_state(
|
|
|
5978
5983
|
start_payload = ev.get("payload")
|
|
5979
5984
|
if not isinstance(start_payload, Mapping):
|
|
5980
5985
|
start_payload = {}
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5986
|
+
if "timestamp" in start_payload:
|
|
5987
|
+
ts, clock_source = start_payload["timestamp"], "payload.timestamp"
|
|
5988
|
+
else:
|
|
5989
|
+
# History pages expose the recorded event time as timestamp.
|
|
5990
|
+
clock_source = "timestamp" if "recorded_at" not in ev and "timestamp" in ev else "recorded_at"
|
|
5991
|
+
ts = ev.get(clock_source)
|
|
5984
5992
|
# A redriven run replays from the failed run's start time, as Core does.
|
|
5985
5993
|
if start_payload.get("recovery_kind") == "redrive" and "replayed_started_at" in start_payload:
|
|
5986
5994
|
ts = start_payload.get("replayed_started_at")
|
|
@@ -6131,8 +6139,7 @@ def _replay_state(
|
|
|
6131
6139
|
selection_opening_payloads: dict[int, dict[str, Any]] = {}
|
|
6132
6140
|
selection_condition_terminal_payloads: dict[int, list[dict[str, Any]]] = {}
|
|
6133
6141
|
selection_condition_sequences: dict[str, int] = {}
|
|
6134
|
-
selection_markers: list[dict[str, Any]] = []
|
|
6135
|
-
selection_marker_indexes: list[int] = []
|
|
6142
|
+
selection_markers: list[tuple[dict[str, Any], int]] = []
|
|
6136
6143
|
selection_marker_cursor = 0
|
|
6137
6144
|
consumed_selection_sequences: set[int] = set()
|
|
6138
6145
|
cancelled_selection_members: dict[tuple[str, int], dict[str, Any]] = {}
|
|
@@ -6378,7 +6385,7 @@ def _replay_state(
|
|
|
6378
6385
|
detail="durable selection member history does not match replayed workflow code",
|
|
6379
6386
|
)
|
|
6380
6387
|
if selection_marker_cursor < len(selection_markers):
|
|
6381
|
-
marker = selection_markers[selection_marker_cursor]
|
|
6388
|
+
marker, _ = selection_markers[selection_marker_cursor]
|
|
6382
6389
|
marker_sequence = (
|
|
6383
6390
|
_parallel_group_integer(marker, "selection_group_base_sequence")
|
|
6384
6391
|
or _parallel_group_integer(marker, "member_base_sequence")
|
|
@@ -6702,8 +6709,7 @@ def _replay_state(
|
|
|
6702
6709
|
wait_resolutions[wait_id] = "timed_out"
|
|
6703
6710
|
elif etype == "SelectionResolved":
|
|
6704
6711
|
if isinstance(payload.get("selection_group_id"), str):
|
|
6705
|
-
selection_markers.append(dict(payload))
|
|
6706
|
-
selection_marker_indexes.append(event_index)
|
|
6712
|
+
selection_markers.append((dict(payload), event_index))
|
|
6707
6713
|
elif etype == "SelectionOperationCancelled":
|
|
6708
6714
|
group_id = payload.get("selection_group_id")
|
|
6709
6715
|
member_base = _parallel_group_integer(payload, "member_base_sequence")
|
|
@@ -6926,7 +6932,7 @@ def _replay_state(
|
|
|
6926
6932
|
resolved_parallel_members,
|
|
6927
6933
|
)
|
|
6928
6934
|
selection_markers.sort(
|
|
6929
|
-
key=lambda
|
|
6935
|
+
key=lambda item: _parallel_group_integer(item[0], "selection_group_base_sequence") or 0,
|
|
6930
6936
|
)
|
|
6931
6937
|
|
|
6932
6938
|
signal_registry: dict[str, str] = getattr(workflow_cls, "__workflow_signals__", {}) or {}
|
|
@@ -7719,7 +7725,7 @@ def _replay_state(
|
|
|
7719
7725
|
winner: DurableOperationHandle,
|
|
7720
7726
|
group_base: int,
|
|
7721
7727
|
group_size: int,
|
|
7722
|
-
) -> int:
|
|
7728
|
+
) -> tuple[int, int | None]:
|
|
7723
7729
|
expected = {
|
|
7724
7730
|
"selection_group_id": winner.selection_group_id,
|
|
7725
7731
|
"selection_group_base_sequence": group_base,
|
|
@@ -7773,9 +7779,12 @@ def _replay_state(
|
|
|
7773
7779
|
"ConditionWaitTimedOut",
|
|
7774
7780
|
}
|
|
7775
7781
|
terminal_types = failure_types if outcome == "failed" else success_types
|
|
7776
|
-
candidates: list[tuple[str, str, int]] = []
|
|
7777
|
-
|
|
7782
|
+
candidates: list[tuple[str, str, int, int]] = []
|
|
7783
|
+
reference_count = 0
|
|
7784
|
+
for index, event in enumerate(events):
|
|
7778
7785
|
event_type = _history_event_type(event)
|
|
7786
|
+
if event_type == resolution_type and (event.get("id") or event.get("event_id")) == resolution_id:
|
|
7787
|
+
reference_count += 1
|
|
7779
7788
|
payload = event.get("payload") or {}
|
|
7780
7789
|
if event_type not in terminal_types or not isinstance(payload, Mapping):
|
|
7781
7790
|
continue
|
|
@@ -7793,7 +7802,7 @@ def _replay_state(
|
|
|
7793
7802
|
"terminal selection history with a durable event id",
|
|
7794
7803
|
[event_type or "<unknown>"],
|
|
7795
7804
|
)
|
|
7796
|
-
candidates.append((event_id, event_type, sequence))
|
|
7805
|
+
candidates.append((event_id, event_type, sequence, index))
|
|
7797
7806
|
|
|
7798
7807
|
resolution = candidates[0] if outcome == "failed" and candidates else (
|
|
7799
7808
|
candidates[-1] if candidates else None
|
|
@@ -7804,7 +7813,7 @@ def _replay_state(
|
|
|
7804
7813
|
"SelectionResolved referencing the event that made its member terminal",
|
|
7805
7814
|
["SelectionResolved"],
|
|
7806
7815
|
)
|
|
7807
|
-
return resolution[2]
|
|
7816
|
+
return resolution[2], resolution[3] if reference_count == 1 else None
|
|
7808
7817
|
|
|
7809
7818
|
def _annotate_selection(
|
|
7810
7819
|
group: SelectGroup,
|
|
@@ -8720,10 +8729,10 @@ def _replay_state(
|
|
|
8720
8729
|
cancellation_intent = boundary
|
|
8721
8730
|
return _state(pending)
|
|
8722
8731
|
if isinstance(cmd, SelectGroup):
|
|
8723
|
-
marker = (
|
|
8732
|
+
marker, marker_index = (
|
|
8724
8733
|
selection_markers[selection_marker_cursor]
|
|
8725
8734
|
if selection_marker_cursor < len(selection_markers)
|
|
8726
|
-
else None
|
|
8735
|
+
else (None, -1)
|
|
8727
8736
|
)
|
|
8728
8737
|
annotated, handles, shapes = _annotate_selection(cmd, marker)
|
|
8729
8738
|
group_base = min(handle.base_sequence for handle in handles.values())
|
|
@@ -8811,10 +8820,10 @@ def _replay_state(
|
|
|
8811
8820
|
"SelectionResolved member identity matching workflow code",
|
|
8812
8821
|
["SelectionResolved"],
|
|
8813
8822
|
)
|
|
8814
|
-
resolution_sequence = _validated_selection_resolution(
|
|
8823
|
+
resolution_sequence, terminal_index = _validated_selection_resolution(
|
|
8815
8824
|
marker,
|
|
8816
8825
|
winner,
|
|
8817
|
-
|
|
8826
|
+
group_base,
|
|
8818
8827
|
len(annotated),
|
|
8819
8828
|
)
|
|
8820
8829
|
winner_offset = winner.base_sequence - group_base
|
|
@@ -8846,7 +8855,7 @@ def _replay_state(
|
|
|
8846
8855
|
["SelectionResolved"],
|
|
8847
8856
|
detail="the committed winner has no terminal member history",
|
|
8848
8857
|
)
|
|
8849
|
-
_advance_cancellation_clock([
|
|
8858
|
+
_advance_cancellation_clock([marker_index])
|
|
8850
8859
|
for sequence in range(
|
|
8851
8860
|
winner.base_sequence,
|
|
8852
8861
|
winner.base_sequence + winner.size,
|
|
@@ -8860,6 +8869,7 @@ def _replay_state(
|
|
|
8860
8869
|
else:
|
|
8861
8870
|
_ordered_condition_result(wait_id, ordered_wait, leaf.predicate)
|
|
8862
8871
|
_release_ordered_condition_receivers(wait_id)
|
|
8872
|
+
ctx._business_clock.observe_selection(marker_index, terminal_index, group_base)
|
|
8863
8873
|
next_value = SelectionResult(
|
|
8864
8874
|
key=winner.key,
|
|
8865
8875
|
index=winner.index,
|
|
@@ -8966,9 +8976,10 @@ def _replay_state(
|
|
|
8966
8976
|
return _terminal_state(stop.value, include_pending=False)
|
|
8967
8977
|
if all(isinstance(leaf, ScheduleActivity) for leaf in cmd):
|
|
8968
8978
|
ctx._business_clock.observe_parallel_group(
|
|
8969
|
-
[(step.history_index, step.workflow_sequence, leaf.activity_type,
|
|
8979
|
+
[("activity", (step.history_index, step.workflow_sequence, leaf.activity_type,
|
|
8980
|
+
leaf._parallel_group_path))
|
|
8970
8981
|
for step, leaf in zip(consumed_steps, cmd, strict=True)],
|
|
8971
|
-
None,
|
|
8982
|
+
None, reconstruction=reconstruction_only,
|
|
8972
8983
|
)
|
|
8973
8984
|
else:
|
|
8974
8985
|
ctx._business_clock.unavailable()
|
|
@@ -9013,32 +9024,29 @@ def _replay_state(
|
|
|
9013
9024
|
group_typed_failure = error
|
|
9014
9025
|
if not cmd:
|
|
9015
9026
|
ctx._business_clock.preserve_boundary()
|
|
9016
|
-
elif group_typed_failure is None and all(
|
|
9017
|
-
|
|
9018
|
-
|
|
9019
|
-
None,
|
|
9020
|
-
)
|
|
9021
|
-
ctx._business_clock.observe_parallel_group(
|
|
9022
|
-
[(step.history_index, step.workflow_sequence, leaf.activity_type, leaf._parallel_group_path)
|
|
9023
|
-
for step, leaf in zip(consumed_steps, cmd, strict=True)],
|
|
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):
|
|
9027
|
+
elif group_typed_failure is None and all(
|
|
9028
|
+
isinstance(leaf, ScheduleActivity | StartTimer | StartChildWorkflow) for leaf in cmd
|
|
9029
|
+
):
|
|
9034
9030
|
selected_failure = next(
|
|
9035
9031
|
(offset for offset, value in enumerate(vals) if failed is not None and value is failed),
|
|
9036
9032
|
None,
|
|
9037
9033
|
)
|
|
9034
|
+
clock_members = []
|
|
9035
|
+
for clock_step, leaf in zip(consumed_steps, cmd, strict=True):
|
|
9036
|
+
clock_target: str | int
|
|
9037
|
+
if isinstance(leaf, ScheduleActivity):
|
|
9038
|
+
family, clock_target = "activity", leaf.activity_type
|
|
9039
|
+
elif isinstance(leaf, StartTimer):
|
|
9040
|
+
family, clock_target = "timer", leaf.delay_seconds
|
|
9041
|
+
else:
|
|
9042
|
+
family, clock_target = "child", leaf.workflow_type
|
|
9043
|
+
clock_members.append((
|
|
9044
|
+
family,
|
|
9045
|
+
(clock_step.history_index, clock_step.workflow_sequence, clock_target,
|
|
9046
|
+
leaf._parallel_group_path),
|
|
9047
|
+
))
|
|
9038
9048
|
ctx._business_clock.observe_parallel_group(
|
|
9039
|
-
|
|
9040
|
-
for step, leaf in zip(consumed_steps, cmd, strict=True)],
|
|
9041
|
-
selected_failure, family="child", reconstruction=reconstruction_only,
|
|
9049
|
+
clock_members, selected_failure, reconstruction=reconstruction_only,
|
|
9042
9050
|
)
|
|
9043
9051
|
else:
|
|
9044
9052
|
ctx._business_clock.unavailable()
|
|
@@ -9272,6 +9280,7 @@ def _replay_state(
|
|
|
9272
9280
|
)
|
|
9273
9281
|
if already_satisfied:
|
|
9274
9282
|
terminal_condition_reopen_cmd = None
|
|
9283
|
+
ctx._business_clock.keep_condition_prior()
|
|
9275
9284
|
next_value = True
|
|
9276
9285
|
continue
|
|
9277
9286
|
if next_opened_mismatch is not None:
|
|
@@ -9356,6 +9365,9 @@ def _replay_state(
|
|
|
9356
9365
|
_advance_cancellation_clock([condition_wait_terminal_indexes.get(opened_id)])
|
|
9357
9366
|
_release_ordered_condition_receivers(opened_id)
|
|
9358
9367
|
terminal_condition_reopen_cmd = None
|
|
9368
|
+
# The worker writes an ordered resolution at
|
|
9369
|
+
# completion; its time is never a boundary.
|
|
9370
|
+
ctx._business_clock.keep_condition_prior()
|
|
9359
9371
|
next_value = resolution_value
|
|
9360
9372
|
wait_yield_count += 1
|
|
9361
9373
|
break
|
|
@@ -9384,6 +9396,10 @@ def _replay_state(
|
|
|
9384
9396
|
wait_yield_count = next_wait_index
|
|
9385
9397
|
continue
|
|
9386
9398
|
terminal_condition_reopen_cmd = None
|
|
9399
|
+
ctx._business_clock.observe_condition_timeout(
|
|
9400
|
+
opened.get("condition_wait_id") if opened is not None else None,
|
|
9401
|
+
reconstruction=reconstruction_only,
|
|
9402
|
+
)
|
|
9387
9403
|
next_value = False
|
|
9388
9404
|
wait_yield_count += 1
|
|
9389
9405
|
break
|
|
@@ -9414,6 +9430,9 @@ def _replay_state(
|
|
|
9414
9430
|
)
|
|
9415
9431
|
terminal_condition_chain_first = wait_opened[first_open_index]
|
|
9416
9432
|
terminal_condition_chain_current = opened
|
|
9433
|
+
# A satisfaction is recorded when the resuming task
|
|
9434
|
+
# completes, after this code ran: keep the prior value.
|
|
9435
|
+
ctx._business_clock.keep_condition_prior()
|
|
9417
9436
|
next_value = True
|
|
9418
9437
|
wait_yield_count += 1
|
|
9419
9438
|
break
|
|
@@ -9425,6 +9444,9 @@ def _replay_state(
|
|
|
9425
9444
|
)
|
|
9426
9445
|
terminal_condition_chain_first = wait_opened[first_open_index]
|
|
9427
9446
|
terminal_condition_chain_current = opened
|
|
9447
|
+
# A satisfaction is recorded when the resuming task
|
|
9448
|
+
# completes, after this code ran: keep the prior value.
|
|
9449
|
+
ctx._business_clock.keep_condition_prior()
|
|
9428
9450
|
next_value = True
|
|
9429
9451
|
wait_yield_count += 1
|
|
9430
9452
|
break
|
{durable_workflow-2.29.0 → durable_workflow-2.31.0}/src/durable_workflow.egg-info/SOURCES.txt
RENAMED
|
@@ -86,10 +86,12 @@ tests/test_avro_value_benchmark.py
|
|
|
86
86
|
tests/test_avro_value_protocol.py
|
|
87
87
|
tests/test_business_replay_clock.py
|
|
88
88
|
tests/test_business_replay_clock_child.py
|
|
89
|
+
tests/test_business_replay_clock_condition.py
|
|
89
90
|
tests/test_business_replay_clock_entry.py
|
|
90
91
|
tests/test_business_replay_clock_parallel.py
|
|
91
92
|
tests/test_business_replay_clock_query_attestation.py
|
|
92
93
|
tests/test_business_replay_clock_redrive.py
|
|
94
|
+
tests/test_business_replay_clock_selection.py
|
|
93
95
|
tests/test_business_replay_clock_sequence_claims.py
|
|
94
96
|
tests/test_cancellation_cause.py
|
|
95
97
|
tests/test_cancellation_context.py
|