Skip to content

fix(otel): restore case 11 replay coverage - #864

Merged
zhongkechen merged 2 commits into
mainfrom
fix/otel11-replay-barrier
Oct 27, 2026
Merged

zhongkechen merged 2 commits into
mainfrom
fix/otel11-replay-barrier

Conversation

@zhongkechen

Copy link
Copy Markdown
Contributor

Issue #, if available

Extracted from #796 for independent early merge. Main's failing run: https://github.com/aws/aws-durable-execution-sdk-python/actions/runs/40554880874.

Description of changes

Case 11 returns immediately after its child completes, but the shared conformance requirement expects a callback barrier followed by another caller replay. Main reports ContextStarted/CallbackStarted missing and ends the execution before the required history events exist.

Add the existing wait_for_callback operation after the invoke, then return the saved child result. The regression test exercises both telemetry views through the real local runner: exactly one child execution, three caller invocations, one callback submitter execution, and the original nested payload returned after resume.

Main also reports seven uncovered requirements per view, and its workflow fails on failed+uncovered. Declare the absent coverage explicitly with the runner's existing NotImplemented metadata: cases 21–24 and 27 are pending in #796; cases 25–26 link to their runtime/testing follow-ups. All 20 existing cases remain active. The newer handlers and workflow changes stay in #796.

Design

  • Design note (rule 3): not needed; this repairs an existing conformance handler using existing public APIs.
  • Simpler options considered (rule 2): an immediate return cannot exercise completed-invoke replay; a fixed delay does not implement the required external callback protocol. Reuse wait_for_callback with the exact scenario name.
  • Root cause (rule 5): the Python handler did not implement the callback/replay phase now required by the shared catalog; newly registered cases also lacked explicit coverage declarations on main.
  • Net change: 14 handler source lines; zero SDK public API changes. The remaining changes are metadata and regression tests.

Assumptions

  • The shared execution case 11 requirement names otel-invoke-replay-barrier, supplies its success payload, and delays completion until the caller invocation has ended.
  • Local validation exercises the real handler, child, SDK, and both plugin factories. No propagation headers, checkpoint responses, or operation outcomes are fabricated. Deployed validation will run in this PR's existing conformance workflow.

Decisions not covered by the issue or the design note

  • Include explicit pending-coverage metadata because fixing case 11 alone leaves main red on seven uncovered requirements. This records missing coverage without bringing the later scenarios into the early fix.
  • Preserve the saved child result across the callback; the callback response is only a resume signal.
  • Add type annotations and the standard license header to the extracted regression test; its behavioral assertions remain intact.

Validation

  • Before the fix: both case 11 parametrizations fail waiting for the absent callback; both coverage-declaration checks fail because NotImplemented is absent.
  • After the fix: hatch run test:all packages/aws-durable-execution-sdk-python-conformance-tests-otel/tests -q --tb=short — 55 passed on Python 3.13.17.
  • Package hatch fmt --check and hatch build — passed.
  • Commit-message validation and git diff --check — passed.
  • No existing test expectations changed; the declaration check is new.

Checklist

  • Every new branch has a test that fails without it (rule 4)
  • For a bug fix: the first commit adds a test that fails on the current code (rule 5)
  • Every edited test expectation is listed in the description, with the reason (rule 5)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions

Copy link
Copy Markdown
Contributor

Codex AI review

One rule 6 approach finding at packages/aws-durable-execution-sdk-python-conformance-tests-otel/template.yaml:109. No SDK invariant violations found. Tests were not executed during this read-only review.

Reviewed commit a8baa73c32904cfd6a1c03155899a3753c954249. Workflow run

@zhongkechen
zhongkechen merged commit a9c14a1 into main Oct 27, 2026
42 checks passed
@zhongkechen
zhongkechen deleted the fix/otel11-replay-barrier branch October 27, 2026 23:02

This branch was successfully deployed

1 active deployment
ai-pr-review-runtime — a8baa73c Deployed Oct 27, 2026 by zhongkechen via ai-pr-review / Codex review / Generate Codex review #2526
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants