Repository navigation
test: cover chained invoke replay and child resume - #1068
Merged
Merged
Conversation
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 23, 2026 18:28 — with
GitHub Actions
Inactive
This was referenced Oct 23, 2026
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 23, 2026 18:29 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 23, 2026 19:39 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 23, 2026 22:53 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
zhongkechen
had a problem deploying
to
ai-pr-review-runtime
October 23, 2026 23:01 — with
GitHub Actions
Error
zhongkechen
had a problem deploying
to
ai-pr-review-runtime
October 23, 2026 23:04 — with
GitHub Actions
Error
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 23, 2026 23:06 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 23, 2026 23:59 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 24, 2026 00:17 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 24, 2026 20:27 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 24, 2026 20:41 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
Keep main's shared OTel orchestrator revision and align both requirement catalog defaults with it. The newer revision contains the replay and child-resume requirements plus subsequent assertion fixes.
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 26, 2026 18:22 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 27, 2026 19:24 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 27, 2026 21:14 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
hln33
reviewed
Oct 27, 2026
hln33
reviewed
Oct 27, 2026
Replace filtered chained-invoke event counts with the complete required history sequence in both tracing views. The stronger assertion detects a child completion recorded before the caller invocation completes.
zhongkechen
had a problem deploying
to
ai-pr-review-runtime
October 27, 2026 23:55 — with
GitHub Actions
Failure
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 27, 2026 23:56 — with
GitHub Actions
Inactive
Codex AI reviewNo actionable findings; the prior findings are addressed. Review was limited to read-only inspection: tests were not executed, and the external conformance workflow’s current Reviewed commit |
hln33
approved these changes
Oct 28, 2026
7 tasks
This branch was previously 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.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue Link, if available
Companion requirements PR aws/aws-durable-execution-conformance-tests#131 is merged. Java counterpart: aws/aws-durable-execution-sdk-java#824. Python counterpart: aws/aws-durable-execution-sdk-python#796. The SDK PRs can merge independently.
Description
Case 11 returned immediately after its child invoke, so the shared requirement could not observe that completed invoke on a later caller replay. The suspended-child scenario previously belonged to the disabled long-running workflow, leaving the ordinary invocation and execution suites without that coverage.
Case 11 now waits at
otel-invoke-replay-barrierafter the child returns, then returns the saved result after the callback resumes it. Its caller followsPENDING → PENDING → SUCCEEDED, with one child execution and one terminal invoke export. Case 27 adds a child that performs a one-second durable wait and returns its original payload after resuming. Both views check two child invocations, stable wait identity, continuation links, and the full six-event caller history required by case 27.Both the shared orchestrator and requirement catalog default to the conformance repository's
mainbranch, which includes the matching 27-case catalog and omits the disabled long-running jobs. Pull requests, pushes, and manual runs usemain; manual runs can still overrideconformance_test_refwith a commit SHA or branch. The package documentation and workflow wiring guard reflect these defaults.Design and simpler alternatives
otel_23_long_chained_invoke.tsunchanged cannot satisfy case 27. That handler requireslong-chained-invokeanddelay_seconds, and emitsotel-long-invoke/otel-long-invoke-target-wait. Case 27 supplieschained-invoke-suspendwithout a delay input and requiresotel-suspended-invoke/otel-suspended-target-wait. A shared factory would need scenario, operation-name, and delay parameters to share a small straight-line workflow. Keeping the explicit handlers makes the required durable identities visible without adding configuration or branches.OTEL_INVOKE_TARGET_FUNCTION_NAMEfails the execution before any child invoke starts. Tests run the actual handler for both invalid values in both views and check the error and absence ofChainedInvokeStartedevents.The selected design retains the scenario handlers, the explicit callback boundary, and the child-completion gate. The child is released only after the caller's first
pauseExecution()completes, establishingInvocationCompletedbeforeChainedInvokeSucceeded. Case 27 asserts that order directly. Its full ordered history assertion replaces the two filtered history-count assertions and preserves their guarantees. SDK behavior and durable operation identities are unchanged.Existing test expectations changed
The expectation changes are in
packages/aws-durable-execution-sdk-js-conformance-tests-otel/__tests__/templates.test.ts:template handler references > finds a reference in every template function: 61 → 65 because case 27 adds a caller and target in each of two tracing views, four functions total. The new total is 60 ordinary-suite functions plus five long-running template functions.requirement coverage > covers the invocation and execution suites: 26 → 27 in each range because both catalogs now include case 27. These assertions continue to enforce exact wiring and catalog coverage; they do not relax an SDK contract.otel-conformance-tests workflow > pins the shared orchestrator to a full commit SHAbecomesdefaults the shared orchestrator and requirements to main: it now checks the orchestrator reference, manual input default, and automatic-run fallback, including preservation of the manual override. This implements the requested default change without changing SDK behavior.In
packages/aws-durable-execution-sdk-js-otel/src/__tests__/helpers/chained-invoke-suspension.ts,keeps child wait continuation telemetry through caller completionreplaces separate counts of oneChainedInvokeStartedand oneChainedInvokeSucceededwith the exact sequenceExecutionStarted, ChainedInvokeStarted, InvocationCompleted, ChainedInvokeSucceeded, InvocationCompleted, ExecutionSucceeded. This strengthens both tracing views to enforce the caller history already required byotel-execution-27.yamlandotel-invocation-27.yaml; it preserves the existing count guarantees.Demo/Screenshots
No UI change. The local tests exercise the deployed handler sources through
LocalDurableTestRunnerand inspect replay phases, returned payloads, operation identity, terminal exports, and configuration failures.Checklist
Testing
Unit Tests
All 43 conformance wiring checks pass. TypeScript checks pass for the conformance handlers and OTel sources, including the test helper; Biome passes for the changed TypeScript file. Core, testing, OTel, and deployable conformance-handler builds pass.
For the workflow-default change, the updated guard first failed against the existing pin (
Expected: "main",Received: "6120aed9e3f8770a946e6e8bb3260a22f6f246f9"), with the other 42 checks passing. After updating all three references, all 43 checks and the handler typecheck pass. Core and OTel builds, Biome on the changed test, andgit diff --checkpass. Both workflow YAML files parse, and every supplied input and secret matches the shared orchestrator currently onmain. Cloud conformance for this update remains unverified until CI completes.Integration Tests
The two case-11 tests check one target invocation, the full 13-event history, and no second terminal invoke export after replay. The target gate explicitly orders the first
InvocationCompletedbeforeChainedInvokeSucceeded, independently of child speed and telemetry flush timing.The case-27 helper has three cases per view: successful suspension/resume, absent target configuration, and empty target configuration. The success case checks the full six-event caller history. Environment replacement is restored after each negative case so the successful workflow retains its configured target.
History-order regression validation used a temporary scheduling probe: remove the target gate and delay the caller's first
PENDINGreturn until the child invoke completes. Both success tests passed their original assertions despiteChainedInvokeSucceededpreceding the firstInvocationCompleted. Adding the ordered assertion made both success tests fail, with the four configuration tests still passing. Restoring the original gate made all six case-27 tests pass. The probe is not included in the commit; it establishes the local assertion gap, not service timing.All eight focused integration cases pass (two case-11 cases and six case-27 cases). Before this follow-up, removing the target guard while preserving TypeScript validity still passed both case-27 tests and all 43 wiring checks. With the new coverage, that same deletion makes all four negative cases fail. Restoring the guard returns all eight integration cases to green. The mutation is not included in the commit.
The existing cloud run at
98216cdb, https://github.com/aws/aws-durable-execution-sdk-js/actions/runs/40377005155, passed all 108 checks across invocation/execution views on ADOT/X-Ray and Community/S3, including cases 11 and 27 in every combination. This is evidence for the service trace carrier and ancestry assertions; local tests alone do not establish them. Cloud CI will rerun for the follow-up commit.Examples
Updated case 11 and added case 27 handlers, SAM mappings, and documentation. Configuration failures and caller-history ordering are covered through the existing local integration helpers.