Serialization context changes in anticipation of Standalone Activity #1155
+62
−44
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Eliminate shared base class -- it's not appropriate in the future when
ActivitySerializationContextwill be applied at the top level (and even in the original workflow-activity case, we moved away from nested scopes)Make workflow identifiers optional in activity context
Add activity ID to activity context
Note
Restructures workflow/activity serialization contexts (removing shared base), makes workflow IDs optional, adds activity IDs, and updates workers/runtime/tests to construct and assert the new contexts.
BaseWorkflowSerializationContext;WorkflowSerializationContextnow directly extendsSerializationContextwithnamespaceand optionalworkflow_id.ActivitySerializationContext: addactivity_id, includenamespace, and makeworkflow_id/workflow_typeoptional; add field docstrings.worker/_activity.pyand_workflow_instance.pyto the new shapes and to populateactivity_id.activity_idto activity executions and expected context dicts; relax types (e.g., trace map key to Optional[str]).EventWorkflowtoWaitForSignalWorkflowin async activity completion test and update signal calls accordingly.Written by Cursor Bugbot for commit 89b721a. This will update automatically on new commits. Configure here.