test: cover OTel replay, status and user callback contexts - #131
Open
zhongkechen wants to merge 13 commits into
Open
zhongkechen wants to merge 13 commits into
zhongkechen wants to merge 13 commits into
Conversation
Open
3 of 4 tasks
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.
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.
Contributor
Codex AI reviewNo actionable findings. Residual risk remains around live telemetry timing and external reusable-workflow/SDK integration behavior. 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.
The existing OTel catalog could miss lost active context in user functions, duplicate exports after a successful suspension, and incorrect invocation-retry status. Add paired invocation/execution cases 21–24 for these paths, with companion public SDK handlers in aws/aws-durable-execution-sdk-js#960, aws/aws-durable-execution-sdk-java#769 and aws/aws-durable-execution-sdk-python#758.
The handlers create ordinary user spans with default parenting. Requirements verify the execution trace, operation/attempt parent, and context restoration after nested work and resume. The coverage matrix documents supported callback categories and the policy/serialization/pre-instrumentation phases outside the current operation-span contract.
Replay checks require five seconds of valid, unchanged telemetry and preserve duplicate span records; a confirmation arriving after the total polling deadline fails. Failed-invocation recovery may still redeliver spans. S3 verifies duplicate counts and UNSET status, which X-Ray can normalize. Invocation retry uses the canonical RETRYING -> UNSET mapping. Its five-second stability check covers every correlated Invocation span. A checkpointed step-retry delay may add one PENDING/OK invocation between RETRYING/UNSET and SUCCEEDED/OK; both exact two- and three-invocation sequences validate every phase and its ordering. Legacy labels, incorrect mappings, and repeated or extra phases fail while operation redelivery remains allowed.
Assertions support same-trace checks, parent alternatives, count-dependent occurrences and an opt-in 1 ms timestamp precision allowance for ordinary user spans. Every occurrence and parent/link alternative is schema-checked before matching, including inactive branches. Unknown selector fields, misplaced controls, and malformed scalar matchers fail even inside unused alternatives; arbitrary nested attribute metadata and valid existing matchers remain supported. Catalog invariants cover all 24 paired cases, with corruption controls for status, roots, links, parents, context, ordering and placeholders.
The CI repair routes read-only review-comment intake through the existing pinned resolver; permissions, authorization guards and the trusted continuation remain unchanged. The self-test workflow pins a Python fixture implementing all 24 cases without reducing the failed/uncovered gate. Manual dispatch accepts SDK commit SHAs or named refs such as main and feature branches; named refs resolve once to an immutable SHA before the suites run.
Validation:
Related SDK issues: aws/aws-durable-execution-sdk-python#750, aws/aws-durable-execution-sdk-python#428 and aws/aws-durable-execution-sdk-js#941. Python's focused context fix is aws/aws-durable-execution-sdk-python#756.