Repository navigation
fix: propagate context into handler workers - #756
Open
zhongkechen wants to merge 23 commits into
Open
zhongkechen wants to merge 23 commits into
zhongkechen wants to merge 23 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This was referenced Oct 2, 2026
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
zhongkechen
had a problem deploying
to
ai-pr-review-runtime
October 3, 2026 02:56 — with
GitHub Actions
Error
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
added 5 commits
October 6, 2026 23:13
…/python-756-20261006 # Conflicts: # packages/aws-durable-execution-sdk-python-otel/README.md
…/python-756-20261006
zhongkechen
had a problem deploying
to
ai-pr-review-runtime
October 7, 2026 02:06 — with
GitHub Actions
Failure
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
Codex AI reviewNo actionable findings. Residual risk is limited to the updated external workflow pin and cloud-only retry path, which were not executable under read-only review constraints. Reviewed commit |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #428.
Carry invocation-start context into the SDK-owned handler worker so ordinary user spans and logs inherit the durable trace. Opted-in Invocation/Execution scopes bind the existing Invocation/Workflow span when the ambient parent is absent or unrelated, retain valid same-trace parents and baggage, and restore context on return, failure or suspension.
Isolate plugin-bearing invocation context from the host. Failed startup or scope-entry bindings are discarded before subsequent setup and user code; finalizers retain the Context that owns their tokens. Existing hook threads/order, result/exception identity and the no-plugin path are preserved.
Optional scopes require literal
__durable_handler_context_api__ = 1on the concrete class. The generic base provides no marker/default hook, so old helpers, properties and dynamic attributes remain untouched; custom subclasses explicitly redeclare the marker. Provider API 1, dependency floors, plugin lifetime and checkpoint/replay formats are unchanged. This fix is independent of #737. Supported older cores load the new plugin and retain their existing tracing behavior; the new worker-scope behavior requires the updated core.Validation:
test-pypi-otel-minimumlane pins actual installed core 2.0.0 and passes all 362 pre-existing-suite cases plus 14 valid registration cases; exact version, site-packages import and absence of the new handler API are asserted. The separate installed core 2.0.x legacy lane passes 14 cases. Repository type checks, formatting and workflow wiring pass. The capable installed-core lane requires core 2.1+ and was not run locally; runtime dependencies still support core 2.0.0.Cross-SDK conformance coverage is in #758 and aws/aws-durable-execution-conformance-tests#131. Current-head CI and actual AI review generation/posting are monitored separately.