durable-workflow 2.29.0__tar.gz → 2.30.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.30.0}/PKG-INFO +1 -1
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/pyproject.toml +3 -3
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/replay_clock.py +50 -25
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/workflow.py +49 -44
- {durable_workflow-2.29.0 → durable_workflow-2.30.0/src/durable_workflow.egg-info}/PKG-INFO +1 -1
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow.egg-info/SOURCES.txt +1 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_business_replay_clock_parallel.py +81 -13
- durable_workflow-2.30.0/tests/test_business_replay_clock_selection.py +111 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_replay_clock.py +17 -8
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_replay_regression_corpus.py +4 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/LICENSE +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/README.md +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/setup.cfg +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/__init__.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_activity_checkpoint.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_activity_lease.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_activity_process.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_avro.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_cancellation_scope.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_cancellation_scope_history.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_capabilities_digest.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_condition_fingerprint.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_condition_input_order.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_continue_as_new.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_cooperative_cancellation.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_failure_reporting.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_metric_routes.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_parallel_group_policy.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_payload_protection.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_poll_transport.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_prepared_local_activity.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_query_task_authority.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_response_limit.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_sticky_workflow_cache.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_timeout_cleanup.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/_typed_values.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/activity.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/auth_composition.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/cancellation.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/client.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/errors.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/external_storage.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/external_task_input.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/external_task_result.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/history_bundle_verify.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/interceptors.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/invocable.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/metrics.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/nexus.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/prepared_payload.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/py.typed +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/python_conformance.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/replay_clock_math.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/replay_conformance.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/replay_verify.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/retry_policy.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/serializer.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/server_compatibility.json +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/sync.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/telemetry.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/telemetry_carrier.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/testing.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/worker.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/worker_session.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/worker_status.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow/workflow_updates_conformance.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow.egg-info/dependency_links.txt +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow.egg-info/entry_points.txt +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow.egg-info/requires.txt +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow.egg-info/top_level.txt +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_acceptance_authority.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_acceptance_consumer.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_acceptance_entry.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_cancellation_policies.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_checkpoint.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_context.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_exponential_retry.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_heartbeat_authority.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_heartbeat_unavailable.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_identity.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_install_inventory.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_lease_authority.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_lease_renewal.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_lease_worker.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_process.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_retry_cap_cell.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_retry_info.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_run_closed_refusal.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_activity_worker_lost.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_auth_composition.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_avro_value_benchmark.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_avro_value_protocol.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_business_replay_clock.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_business_replay_clock_child.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_business_replay_clock_entry.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_business_replay_clock_query_attestation.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_business_replay_clock_redrive.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_business_replay_clock_sequence_claims.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_cancellation_cause.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_cancellation_context.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_cancellation_remaining_time.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_cancellation_scope_admission.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_cancellation_scope_authoring.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_cancellation_scope_boundary.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_cancellation_scope_opening.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_capabilities_digest.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_capabilities_digest_unknown.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_checkpointed_batch_example.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_child_workflow_policies.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_ci_checkout.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_ci_integration_endpoint.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_client.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_client_iterators.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_client_payload_protection.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_client_telemetry.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_client_timeouts.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_coalescing_signal_timer_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_codec_regression_corpus.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_command_keys_acceptance.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_command_keys_captured_inputs.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_command_keys_container_ownership.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_command_keys_workspace.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_committed_cancellation_scope_descendants.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_committed_cancellation_scope_groups.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_committed_cancellation_scope_history.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_committed_cancellation_scope_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_completion_size_limit.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_condition_fingerprint.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_condition_occurrence_id.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_condition_replay_drift.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_continue_as_new_target.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_control_plane_parity_fixtures.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_cooperative_cancellation.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_cooperative_cancellation_client.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_cooperative_cancellation_worker.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_cooperative_remote_worker.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_docs_release_channel.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_docstring_cross_references.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_durable_selection.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_empty_callback_failure.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_errors.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_external_storage.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_external_task_input.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_external_task_result.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_failure_reporting.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_generator_lifecycle.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_golden_history_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_history_bundle_pruned.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_history_bundle_schema2.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_history_bundle_verify.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_history_event_contract.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_invocable.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_local_activity_backoff.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_local_failure_reporting.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_message_streams.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_metric_routes.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_metrics.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_native_timer_redrive_cell.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_native_timer_redrive_clock.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_nexus_durable_wait.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_nexus_namespace.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_nexus_wire.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_order_processing_example.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_ordered_condition_input.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_parallel_completion_order_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_parallel_failure_order.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_parallel_group_boundaries.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_parallel_group_policy.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_parallel_member_failure_open_siblings.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_parallel_saga_authoring.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_patch_history.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_payload_policy_refresh.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_payload_protection.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_pending_operation_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_physical_command_key_readback.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_poll_failure_backoff.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_poll_transport.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_portal_source_split.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_prepared_local_activity_client.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_prepared_local_activity_groups.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_prepared_local_activity_policies.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_prepared_local_activity_worker.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_protected_workflow_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_public_boundary_scanner.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_publish_workflow_isolation.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_published_activity_acceptance.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_published_pagination_evidence.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_pypi_project_surface.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_python_conformance.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_queries.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_query_task_authority.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_query_timeout_retry.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_quiesced_snapshot.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_readme_quickstart.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_redrive_call_ledger.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_redrive_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_redrive_successor_evidence.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_registration_ambiguity.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_release_metadata.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_release_promotion.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_replay_conformance.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_replay_verify.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_response_body_limit.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_result_continue_as_new.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_retry_cap_download.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_retry_cap_workflow.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_retry_policy.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_run_activities.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_run_cancellation_scope_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_run_closed_settlement_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_runtime_external_payload_transport.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_schedule_origin.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_schedules.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_scoped_run_cancellation_context.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_sdk_metrics_contract.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_search_attribute_replay_identity.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_serializer.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_signal_external_workflow.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_signal_with_start.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_signals.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_sleep.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_standalone_activity_client.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_static_credential_validation.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_sticky_execution.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_sticky_history_suffix.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_storage_admission.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_sync.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_sync_activities.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_synthetic_command_key_readback.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_telemetry.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_telemetry_carrier.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_testing_failures.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_testing_harness.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_testing_nexus.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_threaded_heartbeat_example.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_timeout_cleanup.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_tls_trust.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_transport_diagnostics.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_typed_values.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_typed_workflow_values.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_update_outcome.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_update_signal_condition_replay.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_updates.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_wait_condition.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_worker.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_worker_deregistration.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_worker_observation.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_worker_session.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_worker_startup_buffered.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_worker_startup_raw.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_worker_startup_read_budget.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_worker_startup_snapshot.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_worker_status.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_worker_telemetry_wire.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_worker_transient_5xx_retry.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_worker_transient_runtime.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_workflow_entry_arguments.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_workflow_entrypoint_validation.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_workflow_handler_validation.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_workflow_identity.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_workflow_result_timeout.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_workflow_streams.py +0 -0
- {durable_workflow-2.29.0 → durable_workflow-2.30.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.30.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.30.0"
|
|
86
|
+
registry-version = "2.30.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"
|
|
@@ -247,16 +247,23 @@ def _group_event_time(event: Mapping[str, Any], *, public_history: bool = False)
|
|
|
247
247
|
|
|
248
248
|
|
|
249
249
|
def _group_time(
|
|
250
|
-
events: Sequence[Mapping[str, Any]], failed_member: int | None,
|
|
250
|
+
events: Sequence[tuple[Mapping[str, Any], str]], failed_member: int | None,
|
|
251
251
|
) -> datetime | None:
|
|
252
252
|
candidates: list[tuple[int, datetime, int]] = []
|
|
253
|
-
for offset, event in enumerate(events):
|
|
253
|
+
for offset, (event, success_kind) in enumerate(events):
|
|
254
254
|
failed = _kind(event) != success_kind
|
|
255
255
|
if failed != (failed_member is not None):
|
|
256
256
|
if failed:
|
|
257
257
|
return None
|
|
258
258
|
continue # Successful siblings do not choose the failure clock.
|
|
259
|
-
|
|
259
|
+
# Native's public history projects recorded_at as timestamp for every
|
|
260
|
+
# event type. A bare activity timestamp without that row shape is
|
|
261
|
+
# still insufficient to prove the consumed instant.
|
|
262
|
+
sequence = event.get("sequence")
|
|
263
|
+
native_export = type(sequence) is int and sequence > 0 and "principal" in event
|
|
264
|
+
time = _group_event_time(
|
|
265
|
+
event, public_history=native_export or success_kind in {"TimerFired", "ChildRunCompleted"},
|
|
266
|
+
)
|
|
260
267
|
milliseconds = canonical_milliseconds(time) if time is not None else None
|
|
261
268
|
if time is None or milliseconds is None:
|
|
262
269
|
return None
|
|
@@ -413,44 +420,62 @@ class BusinessReplayClock:
|
|
|
413
420
|
self._pending = self._current
|
|
414
421
|
self._pending_entry = self._current_entry
|
|
415
422
|
|
|
423
|
+
def observe_selection(self, marker_index: int, terminal_index: int | None, base_sequence: int) -> None:
|
|
424
|
+
"""Use the matched decision when it follows its unique winner terminal."""
|
|
425
|
+
self._pending = (None, None)
|
|
426
|
+
if terminal_index is None or terminal_index >= marker_index:
|
|
427
|
+
return
|
|
428
|
+
if self._redrive_declared and (self._resume_step is None or base_sequence < self._resume_step):
|
|
429
|
+
return
|
|
430
|
+
marker = self.events[marker_index]
|
|
431
|
+
payload = marker["payload"]
|
|
432
|
+
if (_kind(marker) != "SelectionResolved" or any(key in payload for key in _REUSE_FIELDS)
|
|
433
|
+
or _kind(self.events[terminal_index]) != payload.get("resolution_event_type")):
|
|
434
|
+
return
|
|
435
|
+
self._pending = (marker_index, _time(_recorded_value(marker)))
|
|
436
|
+
|
|
416
437
|
def observe_parallel_group(
|
|
417
|
-
self, members: Sequence[_GroupMember], failed_member: int | None, *,
|
|
438
|
+
self, members: Sequence[tuple[str, _GroupMember]], failed_member: int | None, *, reconstruction: bool,
|
|
418
439
|
) -> None:
|
|
419
440
|
self._pending = (None, None)
|
|
420
441
|
# Core's successful query group-send supplies no new time. Body and
|
|
421
442
|
# callback reconstruction cannot borrow an executor-only aggregate.
|
|
422
|
-
if reconstruction or not members
|
|
443
|
+
if reconstruction or not members:
|
|
444
|
+
return
|
|
445
|
+
_, first = members[0]
|
|
446
|
+
first_path = first[3]
|
|
447
|
+
if not first_path:
|
|
423
448
|
return
|
|
424
|
-
root =
|
|
425
|
-
|
|
426
|
-
|
|
449
|
+
root = first_path[0]
|
|
450
|
+
families = {family for family, _ in members}
|
|
451
|
+
group_kind = next(iter(families)) if len(families) == 1 else "mixed"
|
|
452
|
+
if (root.get("parallel_group_base_sequence") != first[1]
|
|
453
|
+
or root.get("parallel_group_size") != len(members) or root.get("parallel_group_kind") != group_kind):
|
|
427
454
|
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):
|
|
455
|
+
boundaries = {
|
|
456
|
+
"activity": (self._activity_group_boundary, "activity_execution_id", "ActivityCompleted"),
|
|
457
|
+
"timer": (self._timer_group_boundary, "timer_id", "TimerFired"),
|
|
458
|
+
"child": (self._child_group_boundary, "child_call_id", "ChildRunCompleted"),
|
|
459
|
+
}
|
|
460
|
+
events: list[tuple[Mapping[str, Any], str]] = []
|
|
461
|
+
identities: set[tuple[str, str]] = set()
|
|
462
|
+
for offset, (family, member) in enumerate(members):
|
|
463
|
+
proof = boundaries.get(family)
|
|
440
464
|
path = member[3]
|
|
441
465
|
expected_root = {**root, "parallel_group_index": offset}
|
|
442
|
-
if (not path or not _group_entry_matches(path[0], expected_root)
|
|
443
|
-
or member[1] !=
|
|
466
|
+
if (proof is None or not path or not _group_entry_matches(path[0], expected_root)
|
|
467
|
+
or member[1] != first[1] + offset):
|
|
444
468
|
return
|
|
469
|
+
boundary, identity_field, success_kind = proof
|
|
445
470
|
event = boundary(member)
|
|
446
471
|
if event is None:
|
|
447
472
|
return
|
|
448
|
-
identity = event["payload"][identity_field]
|
|
473
|
+
identity = family, event["payload"][identity_field]
|
|
449
474
|
if identity in identities:
|
|
450
475
|
return
|
|
451
476
|
identities.add(identity)
|
|
452
|
-
events.append(event)
|
|
453
|
-
self._pending = (None, _group_time(events, failed_member
|
|
477
|
+
events.append((event, success_kind))
|
|
478
|
+
self._pending = (None, _group_time(events, failed_member))
|
|
454
479
|
|
|
455
480
|
def observe_propagated_activity_failure(self, member: _GroupMember, *, reconstruction: bool) -> None:
|
|
456
481
|
"""Use only the qualified first-recorded failure of an explicit group."""
|
|
@@ -3335,8 +3335,10 @@ 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. Group success
|
|
3341
|
+
retains the selected event's full precision;
|
|
3340
3342
|
matching caught failure uses canonical-v1 integer milliseconds.
|
|
3341
3343
|
Ordinary entry reads the run's canonical start from the workflow
|
|
3342
3344
|
task's ``replay_clock`` carrier (``WorkerReplayClock`` v1). Entry is
|
|
@@ -5978,9 +5980,12 @@ def _replay_state(
|
|
|
5978
5980
|
start_payload = ev.get("payload")
|
|
5979
5981
|
if not isinstance(start_payload, Mapping):
|
|
5980
5982
|
start_payload = {}
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5983
|
+
if "timestamp" in start_payload:
|
|
5984
|
+
ts, clock_source = start_payload["timestamp"], "payload.timestamp"
|
|
5985
|
+
else:
|
|
5986
|
+
# History pages expose the recorded event time as timestamp.
|
|
5987
|
+
clock_source = "timestamp" if "recorded_at" not in ev and "timestamp" in ev else "recorded_at"
|
|
5988
|
+
ts = ev.get(clock_source)
|
|
5984
5989
|
# A redriven run replays from the failed run's start time, as Core does.
|
|
5985
5990
|
if start_payload.get("recovery_kind") == "redrive" and "replayed_started_at" in start_payload:
|
|
5986
5991
|
ts = start_payload.get("replayed_started_at")
|
|
@@ -6131,8 +6136,7 @@ def _replay_state(
|
|
|
6131
6136
|
selection_opening_payloads: dict[int, dict[str, Any]] = {}
|
|
6132
6137
|
selection_condition_terminal_payloads: dict[int, list[dict[str, Any]]] = {}
|
|
6133
6138
|
selection_condition_sequences: dict[str, int] = {}
|
|
6134
|
-
selection_markers: list[dict[str, Any]] = []
|
|
6135
|
-
selection_marker_indexes: list[int] = []
|
|
6139
|
+
selection_markers: list[tuple[dict[str, Any], int]] = []
|
|
6136
6140
|
selection_marker_cursor = 0
|
|
6137
6141
|
consumed_selection_sequences: set[int] = set()
|
|
6138
6142
|
cancelled_selection_members: dict[tuple[str, int], dict[str, Any]] = {}
|
|
@@ -6378,7 +6382,7 @@ def _replay_state(
|
|
|
6378
6382
|
detail="durable selection member history does not match replayed workflow code",
|
|
6379
6383
|
)
|
|
6380
6384
|
if selection_marker_cursor < len(selection_markers):
|
|
6381
|
-
marker = selection_markers[selection_marker_cursor]
|
|
6385
|
+
marker, _ = selection_markers[selection_marker_cursor]
|
|
6382
6386
|
marker_sequence = (
|
|
6383
6387
|
_parallel_group_integer(marker, "selection_group_base_sequence")
|
|
6384
6388
|
or _parallel_group_integer(marker, "member_base_sequence")
|
|
@@ -6702,8 +6706,7 @@ def _replay_state(
|
|
|
6702
6706
|
wait_resolutions[wait_id] = "timed_out"
|
|
6703
6707
|
elif etype == "SelectionResolved":
|
|
6704
6708
|
if isinstance(payload.get("selection_group_id"), str):
|
|
6705
|
-
selection_markers.append(dict(payload))
|
|
6706
|
-
selection_marker_indexes.append(event_index)
|
|
6709
|
+
selection_markers.append((dict(payload), event_index))
|
|
6707
6710
|
elif etype == "SelectionOperationCancelled":
|
|
6708
6711
|
group_id = payload.get("selection_group_id")
|
|
6709
6712
|
member_base = _parallel_group_integer(payload, "member_base_sequence")
|
|
@@ -6926,7 +6929,7 @@ def _replay_state(
|
|
|
6926
6929
|
resolved_parallel_members,
|
|
6927
6930
|
)
|
|
6928
6931
|
selection_markers.sort(
|
|
6929
|
-
key=lambda
|
|
6932
|
+
key=lambda item: _parallel_group_integer(item[0], "selection_group_base_sequence") or 0,
|
|
6930
6933
|
)
|
|
6931
6934
|
|
|
6932
6935
|
signal_registry: dict[str, str] = getattr(workflow_cls, "__workflow_signals__", {}) or {}
|
|
@@ -7719,7 +7722,7 @@ def _replay_state(
|
|
|
7719
7722
|
winner: DurableOperationHandle,
|
|
7720
7723
|
group_base: int,
|
|
7721
7724
|
group_size: int,
|
|
7722
|
-
) -> int:
|
|
7725
|
+
) -> tuple[int, int | None]:
|
|
7723
7726
|
expected = {
|
|
7724
7727
|
"selection_group_id": winner.selection_group_id,
|
|
7725
7728
|
"selection_group_base_sequence": group_base,
|
|
@@ -7773,9 +7776,12 @@ def _replay_state(
|
|
|
7773
7776
|
"ConditionWaitTimedOut",
|
|
7774
7777
|
}
|
|
7775
7778
|
terminal_types = failure_types if outcome == "failed" else success_types
|
|
7776
|
-
candidates: list[tuple[str, str, int]] = []
|
|
7777
|
-
|
|
7779
|
+
candidates: list[tuple[str, str, int, int]] = []
|
|
7780
|
+
reference_count = 0
|
|
7781
|
+
for index, event in enumerate(events):
|
|
7778
7782
|
event_type = _history_event_type(event)
|
|
7783
|
+
if event_type == resolution_type and (event.get("id") or event.get("event_id")) == resolution_id:
|
|
7784
|
+
reference_count += 1
|
|
7779
7785
|
payload = event.get("payload") or {}
|
|
7780
7786
|
if event_type not in terminal_types or not isinstance(payload, Mapping):
|
|
7781
7787
|
continue
|
|
@@ -7793,7 +7799,7 @@ def _replay_state(
|
|
|
7793
7799
|
"terminal selection history with a durable event id",
|
|
7794
7800
|
[event_type or "<unknown>"],
|
|
7795
7801
|
)
|
|
7796
|
-
candidates.append((event_id, event_type, sequence))
|
|
7802
|
+
candidates.append((event_id, event_type, sequence, index))
|
|
7797
7803
|
|
|
7798
7804
|
resolution = candidates[0] if outcome == "failed" and candidates else (
|
|
7799
7805
|
candidates[-1] if candidates else None
|
|
@@ -7804,7 +7810,7 @@ def _replay_state(
|
|
|
7804
7810
|
"SelectionResolved referencing the event that made its member terminal",
|
|
7805
7811
|
["SelectionResolved"],
|
|
7806
7812
|
)
|
|
7807
|
-
return resolution[2]
|
|
7813
|
+
return resolution[2], resolution[3] if reference_count == 1 else None
|
|
7808
7814
|
|
|
7809
7815
|
def _annotate_selection(
|
|
7810
7816
|
group: SelectGroup,
|
|
@@ -8720,10 +8726,10 @@ def _replay_state(
|
|
|
8720
8726
|
cancellation_intent = boundary
|
|
8721
8727
|
return _state(pending)
|
|
8722
8728
|
if isinstance(cmd, SelectGroup):
|
|
8723
|
-
marker = (
|
|
8729
|
+
marker, marker_index = (
|
|
8724
8730
|
selection_markers[selection_marker_cursor]
|
|
8725
8731
|
if selection_marker_cursor < len(selection_markers)
|
|
8726
|
-
else None
|
|
8732
|
+
else (None, -1)
|
|
8727
8733
|
)
|
|
8728
8734
|
annotated, handles, shapes = _annotate_selection(cmd, marker)
|
|
8729
8735
|
group_base = min(handle.base_sequence for handle in handles.values())
|
|
@@ -8811,10 +8817,10 @@ def _replay_state(
|
|
|
8811
8817
|
"SelectionResolved member identity matching workflow code",
|
|
8812
8818
|
["SelectionResolved"],
|
|
8813
8819
|
)
|
|
8814
|
-
resolution_sequence = _validated_selection_resolution(
|
|
8820
|
+
resolution_sequence, terminal_index = _validated_selection_resolution(
|
|
8815
8821
|
marker,
|
|
8816
8822
|
winner,
|
|
8817
|
-
|
|
8823
|
+
group_base,
|
|
8818
8824
|
len(annotated),
|
|
8819
8825
|
)
|
|
8820
8826
|
winner_offset = winner.base_sequence - group_base
|
|
@@ -8846,7 +8852,7 @@ def _replay_state(
|
|
|
8846
8852
|
["SelectionResolved"],
|
|
8847
8853
|
detail="the committed winner has no terminal member history",
|
|
8848
8854
|
)
|
|
8849
|
-
_advance_cancellation_clock([
|
|
8855
|
+
_advance_cancellation_clock([marker_index])
|
|
8850
8856
|
for sequence in range(
|
|
8851
8857
|
winner.base_sequence,
|
|
8852
8858
|
winner.base_sequence + winner.size,
|
|
@@ -8860,6 +8866,7 @@ def _replay_state(
|
|
|
8860
8866
|
else:
|
|
8861
8867
|
_ordered_condition_result(wait_id, ordered_wait, leaf.predicate)
|
|
8862
8868
|
_release_ordered_condition_receivers(wait_id)
|
|
8869
|
+
ctx._business_clock.observe_selection(marker_index, terminal_index, group_base)
|
|
8863
8870
|
next_value = SelectionResult(
|
|
8864
8871
|
key=winner.key,
|
|
8865
8872
|
index=winner.index,
|
|
@@ -8966,9 +8973,10 @@ def _replay_state(
|
|
|
8966
8973
|
return _terminal_state(stop.value, include_pending=False)
|
|
8967
8974
|
if all(isinstance(leaf, ScheduleActivity) for leaf in cmd):
|
|
8968
8975
|
ctx._business_clock.observe_parallel_group(
|
|
8969
|
-
[(step.history_index, step.workflow_sequence, leaf.activity_type,
|
|
8976
|
+
[("activity", (step.history_index, step.workflow_sequence, leaf.activity_type,
|
|
8977
|
+
leaf._parallel_group_path))
|
|
8970
8978
|
for step, leaf in zip(consumed_steps, cmd, strict=True)],
|
|
8971
|
-
None,
|
|
8979
|
+
None, reconstruction=reconstruction_only,
|
|
8972
8980
|
)
|
|
8973
8981
|
else:
|
|
8974
8982
|
ctx._business_clock.unavailable()
|
|
@@ -9013,32 +9021,29 @@ def _replay_state(
|
|
|
9013
9021
|
group_typed_failure = error
|
|
9014
9022
|
if not cmd:
|
|
9015
9023
|
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):
|
|
9024
|
+
elif group_typed_failure is None and all(
|
|
9025
|
+
isinstance(leaf, ScheduleActivity | StartTimer | StartChildWorkflow) for leaf in cmd
|
|
9026
|
+
):
|
|
9034
9027
|
selected_failure = next(
|
|
9035
9028
|
(offset for offset, value in enumerate(vals) if failed is not None and value is failed),
|
|
9036
9029
|
None,
|
|
9037
9030
|
)
|
|
9031
|
+
clock_members = []
|
|
9032
|
+
for clock_step, leaf in zip(consumed_steps, cmd, strict=True):
|
|
9033
|
+
clock_target: str | int
|
|
9034
|
+
if isinstance(leaf, ScheduleActivity):
|
|
9035
|
+
family, clock_target = "activity", leaf.activity_type
|
|
9036
|
+
elif isinstance(leaf, StartTimer):
|
|
9037
|
+
family, clock_target = "timer", leaf.delay_seconds
|
|
9038
|
+
else:
|
|
9039
|
+
family, clock_target = "child", leaf.workflow_type
|
|
9040
|
+
clock_members.append((
|
|
9041
|
+
family,
|
|
9042
|
+
(clock_step.history_index, clock_step.workflow_sequence, clock_target,
|
|
9043
|
+
leaf._parallel_group_path),
|
|
9044
|
+
))
|
|
9038
9045
|
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,
|
|
9046
|
+
clock_members, selected_failure, reconstruction=reconstruction_only,
|
|
9042
9047
|
)
|
|
9043
9048
|
else:
|
|
9044
9049
|
ctx._business_clock.unavailable()
|
{durable_workflow-2.29.0 → durable_workflow-2.30.0}/src/durable_workflow.egg-info/SOURCES.txt
RENAMED
|
@@ -90,6 +90,7 @@ tests/test_business_replay_clock_entry.py
|
|
|
90
90
|
tests/test_business_replay_clock_parallel.py
|
|
91
91
|
tests/test_business_replay_clock_query_attestation.py
|
|
92
92
|
tests/test_business_replay_clock_redrive.py
|
|
93
|
+
tests/test_business_replay_clock_selection.py
|
|
93
94
|
tests/test_business_replay_clock_sequence_claims.py
|
|
94
95
|
tests/test_cancellation_cause.py
|
|
95
96
|
tests/test_cancellation_context.py
|
{durable_workflow-2.29.0 → durable_workflow-2.30.0}/tests/test_business_replay_clock_parallel.py
RENAMED
|
@@ -16,6 +16,7 @@ from durable_workflow.replay_clock_math import canonical_milliseconds, from_cano
|
|
|
16
16
|
from durable_workflow.workflow import WorkflowContext, query_state, replay
|
|
17
17
|
from tests.business_clock_workflows import (
|
|
18
18
|
ParallelChildBusinessClockWorkflow,
|
|
19
|
+
ParallelMixedBusinessClockWorkflow,
|
|
19
20
|
ParallelTimerBusinessClockWorkflow,
|
|
20
21
|
clock_text,
|
|
21
22
|
)
|
|
@@ -515,26 +516,93 @@ def test_pending_and_unmarked_legacy_groups_do_not_receive_a_proved_clock() -> N
|
|
|
515
516
|
assert result(rows, ParallelProbe)["clock"] is None
|
|
516
517
|
|
|
517
518
|
|
|
518
|
-
def
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
519
|
+
def mixed_group_history(
|
|
520
|
+
times: list[str], *, activity_failed: bool = False, child_failed: bool = False,
|
|
521
|
+
order: tuple[int, ...] = (2, 1, 0),
|
|
522
|
+
) -> list[dict[str, Any]]:
|
|
523
|
+
rows = history(times, order=order, failures={0} if activity_failed else None)
|
|
524
|
+
child = child_rows(3, "ChildRunFailed" if child_failed else "ChildRunCompleted", times[2])
|
|
525
|
+
mixed = [rows[0]]
|
|
525
526
|
for row in rows[1:]:
|
|
526
527
|
payload = row["payload"]
|
|
527
|
-
payload["
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
entry.update(parallel_group_id="parallel-calls:1:2", parallel_group_kind="mixed")
|
|
528
|
+
group = {**payload["parallel_group_path"][0], "parallel_group_id": "parallel-calls:1:3",
|
|
529
|
+
"parallel_group_kind": "mixed"}
|
|
530
|
+
payload.update(group, parallel_group_path=[group])
|
|
531
531
|
if payload["sequence"] == 2:
|
|
532
532
|
row["event_type"] = "TimerScheduled" if row["event_type"] == "ActivityScheduled" else "TimerFired"
|
|
533
533
|
for field in ("activity_type", "activity_execution_id", "result"):
|
|
534
534
|
payload.pop(field, None)
|
|
535
|
-
payload.update(
|
|
536
|
-
|
|
535
|
+
payload.update(timer_id="group-timer", delay_seconds=1)
|
|
536
|
+
if payload["sequence"] == 3:
|
|
537
|
+
replacements = child[:-1] if row["event_type"] == "ActivityScheduled" else child[-1:]
|
|
538
|
+
for replacement in replacements:
|
|
539
|
+
replacement["payload"].pop("reused_recorded_at", None)
|
|
540
|
+
replacement["payload"].update(group, parallel_group_path=[group])
|
|
541
|
+
mixed.extend(replacements)
|
|
542
|
+
else:
|
|
543
|
+
mixed.append(row)
|
|
544
|
+
return mixed
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
@pytest.mark.parametrize("order", [(0, 1, 2), (2, 1, 0)])
|
|
548
|
+
@pytest.mark.parametrize("timer_time,expected", [(TIED, FIRST), ("2026-01-01T00:00:03.123500+00:00",
|
|
549
|
+
"2026-01-01T00:00:03.123500+00:00")])
|
|
550
|
+
def test_mixed_remote_group_uses_only_the_proved_consumed_members(
|
|
551
|
+
order: tuple[int, ...], timer_time: str, expected: str,
|
|
552
|
+
) -> None:
|
|
553
|
+
rows = mixed_group_history([FIRST, timer_time, TIED], order=order)
|
|
554
|
+
rows.append({"event_type": "WorkflowTaskCompleted", "recorded_at": "2099-01-01T00:00:00Z", "payload": {}})
|
|
555
|
+
original = deepcopy(rows)
|
|
556
|
+
wanted = {"values": ["value-0", None, "recorded"], "failure": None, "clock": expected,
|
|
557
|
+
"repeated": expected, "legacy": START}
|
|
558
|
+
assert result(rows, ParallelMixedBusinessClockWorkflow) == wanted
|
|
559
|
+
assert result(rows, ParallelMixedBusinessClockWorkflow) == wanted
|
|
560
|
+
assert rows == original
|
|
561
|
+
for query in ("body-clock", "clock"):
|
|
562
|
+
assert query_state(ParallelMixedBusinessClockWorkflow, rows, [], query, payload_codec="avro") is None
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
def test_unproved_mixed_timer_keeps_the_result_without_certifying_time() -> None:
|
|
566
|
+
rows = mixed_group_history([FIRST, TIED, TIED])
|
|
567
|
+
timer = next(row for row in rows if row["event_type"] == "TimerFired")
|
|
568
|
+
timer["payload"]["timer_kind"] = "durable_timer"
|
|
569
|
+
actual = result(rows, ParallelMixedBusinessClockWorkflow)
|
|
570
|
+
assert actual["values"] == ["value-0", None, "recorded"]
|
|
571
|
+
assert actual["clock"] is None
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
def test_mixed_group_clock_survives_the_native_public_history_projection() -> None:
|
|
575
|
+
rows = mixed_group_history([FIRST, TIED, TIED])
|
|
576
|
+
expected = result(rows, ParallelMixedBusinessClockWorkflow)
|
|
577
|
+
assert expected["clock"] == FIRST
|
|
578
|
+
for sequence, row in enumerate(rows[1:], start=2):
|
|
579
|
+
row["sequence"] = sequence
|
|
580
|
+
row["principal"] = None
|
|
581
|
+
row["timestamp"] = row.pop("recorded_at")
|
|
582
|
+
assert result(rows, ParallelMixedBusinessClockWorkflow) == expected
|
|
583
|
+
|
|
584
|
+
activity = next(row for row in rows if row["event_type"] == "ActivityCompleted")
|
|
585
|
+
activity.pop("principal")
|
|
586
|
+
assert result(rows, ParallelMixedBusinessClockWorkflow)["clock"] is None
|
|
587
|
+
activity["principal"] = None
|
|
588
|
+
activity["recorded_at"] = TIED
|
|
589
|
+
assert result(rows, ParallelMixedBusinessClockWorkflow)["clock"] is None
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
def test_mixed_group_retains_the_executors_selected_failure() -> None:
|
|
593
|
+
earlier_child = "2026-01-01T00:00:02.500400+00:00"
|
|
594
|
+
rows = mixed_group_history([FIRST, TIED, earlier_child], child_failed=True)
|
|
595
|
+
actual = result(rows, ParallelMixedBusinessClockWorkflow)
|
|
596
|
+
assert actual["failure"] == ["run-3", "recorded child failure"]
|
|
597
|
+
assert actual["clock"] == "2026-01-01T00:00:02.500000+00:00"
|
|
598
|
+
|
|
599
|
+
rows = mixed_group_history([FIRST, TIED, earlier_child], activity_failed=True, child_failed=True)
|
|
600
|
+
actual = result(rows, ParallelMixedBusinessClockWorkflow)
|
|
601
|
+
assert actual["failure"] == ["group.0", "failure-0"]
|
|
602
|
+
assert actual["clock"] is None
|
|
603
|
+
|
|
537
604
|
|
|
605
|
+
def test_recorded_local_group_remains_explicitly_unqualified() -> None:
|
|
538
606
|
class Local:
|
|
539
607
|
def run(self, ctx: WorkflowContext): # type: ignore[no-untyped-def]
|
|
540
608
|
values = yield [ctx.local_activity("prepared.first", []), ctx.local_activity("prepared.second", [])]
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import json
|
|
4
|
+
from copy import deepcopy
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
import pytest
|
|
9
|
+
|
|
10
|
+
from durable_workflow import workflow
|
|
11
|
+
from durable_workflow.workflow import WorkflowContext, query_state
|
|
12
|
+
from tests.business_clock_workflows import SelectionBusinessClockWorkflow
|
|
13
|
+
from tests.test_business_replay_clock import result
|
|
14
|
+
|
|
15
|
+
FIXTURE = Path(__file__).parent / "fixtures/replay_regressions/business-clock-selection-decision.json"
|
|
16
|
+
DECISION = "2026-11-01T00:00:04.123456+00:00"
|
|
17
|
+
WINNER = {"winner": "first", "portable": DECISION, "unchanged_prefix": True}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def selection_history() -> list[dict[str, Any]]:
|
|
21
|
+
return json.loads(FIXTURE.read_text(encoding="utf-8"))["history"]
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def test_selection_replay_and_query_bind_the_same_decision_without_borrowing_a_later_suffix() -> None:
|
|
25
|
+
events = selection_history()
|
|
26
|
+
prefix = events[:-1]
|
|
27
|
+
assert result(prefix, SelectionBusinessClockWorkflow) == WINNER
|
|
28
|
+
assert result(events, SelectionBusinessClockWorkflow) == WINNER
|
|
29
|
+
assert query_state(
|
|
30
|
+
SelectionBusinessClockWorkflow, prefix, [], "selection", payload_codec="avro",
|
|
31
|
+
) == {**WINNER, "callback": DECISION}
|
|
32
|
+
assert query_state(
|
|
33
|
+
SelectionBusinessClockWorkflow, events, [], "selection", payload_codec="avro",
|
|
34
|
+
) == {**WINNER, "callback": None}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def test_selection_decision_accepts_the_native_history_timestamp() -> None:
|
|
38
|
+
events = selection_history()
|
|
39
|
+
marker = events[3]
|
|
40
|
+
marker["timestamp"] = marker.pop("recorded_at")
|
|
41
|
+
assert result(events, SelectionBusinessClockWorkflow) == WINNER
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
@pytest.mark.parametrize("case", [
|
|
45
|
+
"invalid", "missing", "native-invalid", "copied", "early", "duplicate-terminal", "crossed-reference",
|
|
46
|
+
"terminal-kind-alias",
|
|
47
|
+
])
|
|
48
|
+
def test_selection_result_survives_an_unproved_decision_time(case: str) -> None:
|
|
49
|
+
events = selection_history()
|
|
50
|
+
marker = events[3]
|
|
51
|
+
if case == "invalid":
|
|
52
|
+
marker["recorded_at"] = "2026-11-01T00:00:04.123456"
|
|
53
|
+
elif case == "missing":
|
|
54
|
+
marker.pop("recorded_at")
|
|
55
|
+
elif case == "native-invalid":
|
|
56
|
+
marker["timestamp"] = "malformed"
|
|
57
|
+
elif case == "copied":
|
|
58
|
+
marker["payload"]["reused_from_run_id"] = "original"
|
|
59
|
+
elif case == "early":
|
|
60
|
+
events[2], events[3] = events[3], events[2]
|
|
61
|
+
elif case == "duplicate-terminal":
|
|
62
|
+
events.insert(3, deepcopy(events[2]))
|
|
63
|
+
elif case == "crossed-reference":
|
|
64
|
+
events[-1]["id"] = events[2]["id"]
|
|
65
|
+
else:
|
|
66
|
+
events[2]["type"] = "ActivityFailed"
|
|
67
|
+
for sequence, event in enumerate(events, 1):
|
|
68
|
+
event["sequence"] = sequence
|
|
69
|
+
assert result(events, SelectionBusinessClockWorkflow) == {**WINNER, "portable": None}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
@pytest.mark.parametrize("resume_step,expected", [(None, None), (1, DECISION), (2, None)])
|
|
73
|
+
def test_redrive_requires_a_proved_resume_boundary_for_a_fresh_selection(
|
|
74
|
+
resume_step: int | None, expected: str | None,
|
|
75
|
+
) -> None:
|
|
76
|
+
events = selection_history()
|
|
77
|
+
events.insert(0, {
|
|
78
|
+
"event_type": "WorkflowStarted",
|
|
79
|
+
"recorded_at": "2026-11-01T00:00:00.000000Z",
|
|
80
|
+
"payload": {
|
|
81
|
+
"recovery_kind": "redrive",
|
|
82
|
+
"workflow_instance_id": "selection-instance",
|
|
83
|
+
"workflow_run_id": "selection-successor",
|
|
84
|
+
"workflow_command_id": "selection-start",
|
|
85
|
+
"continued_from_run_id": "selection-original",
|
|
86
|
+
"workflow_link_id": "selection-redrive-link",
|
|
87
|
+
"replayed_started_at": "2026-10-31T23:59:00.123456Z",
|
|
88
|
+
"resume_step_sequence": resume_step,
|
|
89
|
+
},
|
|
90
|
+
})
|
|
91
|
+
for sequence, event in enumerate(events, 1):
|
|
92
|
+
event["sequence"] = sequence
|
|
93
|
+
assert result(events, SelectionBusinessClockWorkflow) == {**WINNER, "portable": expected}
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
@workflow.defn(name="tests.replay.selection-with-fixed-clock")
|
|
97
|
+
class FixedClockSelectionWorkflow:
|
|
98
|
+
def run(self, ctx: WorkflowContext): # type: ignore[no-untyped-def]
|
|
99
|
+
before = ctx.now()
|
|
100
|
+
selected = yield from SelectionBusinessClockWorkflow().run(ctx)
|
|
101
|
+
return {**selected, "legacy": [instant.isoformat() for instant in (before, ctx.now())]}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def test_a_selection_decision_leaves_the_existing_fixed_clock_at_start() -> None:
|
|
105
|
+
events = selection_history()
|
|
106
|
+
events.insert(0, {"event_type": "WorkflowStarted", "recorded_at": "2026-11-01T00:00:00.123456Z", "payload": {}})
|
|
107
|
+
for sequence, event in enumerate(events, 1):
|
|
108
|
+
event["sequence"] = sequence
|
|
109
|
+
assert result(events, FixedClockSelectionWorkflow) == {
|
|
110
|
+
**WINNER, "legacy": ["2026-11-01T00:00:00.123456+00:00"] * 2,
|
|
111
|
+
}
|