Skip to content

test: cover OTel replay and user callback contexts - #758

Open
zhongkechen wants to merge 16 commits into
mainfrom
test/otel-conformance-feasibility
Open

zhongkechen wants to merge 16 commits into
mainfrom
test/otel-conformance-feasibility

Conversation

@zhongkechen

@zhongkechen zhongkechen commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Add Python handlers and SAM mappings for OTel cases 21–24: completed-step replay, active context in user functions and callbacks, and invocation retry status. Ordinary user spans inherit their active parent; handlers never attach replacement context or copy execution identity into probe spans.

Shared requirements: aws/aws-durable-execution-conformance-tests#131, pinned to 98b802cdb172614f98e217f7464784d47b9bb484 in the workflow and both test-ref defaults. This PR targets main and includes focused handler-context #756 and status-mapping #752. Merge those runtime prerequisites and the shared requirements first. Python #737 and its factory migration are excluded.

The handlers exercise public APIs across initial execution, wait/resume, failures, parallel/map branches, polling, callback submitters, retry helpers and virtual contexts. Tests verify canonical trace/parent IDs, exact probe counts, completed-body suppression and caller-context restoration. The shared coverage matrix documents initialization, policy, serialization and application-created thread boundaries that lack an active SDK-operation-span contract.

Validation:

  • 65 conformance-package tests pass; wiring, focused types, formatting and bundles pass.
  • 324 combined OTel tests pass against both the workspace core and the actual installed minimum core 2.0.0, with strict current-core assertions and explicit legacy behavior. Type checks cover 30 files. Direct scope cases cover same/unrelated/absent ambient parents, baggage, both samplers, success and failure.
  • PR CI verifies core 2.0.0 is imported from site-packages and has no new optional handler hook, then runs the compatibility suite on Python 3.11–3.14. The package dependency floor remains unchanged.
  • Real local exported traces pass seven of eight shared case/view checks. The remaining invocation-21 duplicate wait continuation also reproduces on unchanged main's local tester; its cloud case passes and assertions were not weakened.
  • Normal PR CI runs all 24 cases in both views through ADOT/X-Ray and S3 against the exact SDK commit and pinned requirements. Current head dd69e05728c60647aae76202321f5d34b605c00e passes all applicable workflows and has no unresolved AI findings.

The failed-plus-uncovered conformance gate remains enabled. No IAM or workflow trust changes are included.

@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 3, 2026 00:14 — with GitHub Actions Active
@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 3, 2026 00:19 — with GitHub Actions Active
@github-actions

This comment has been minimized.

@zhongkechen zhongkechen changed the title test(otel): cover replay and callback contexts test: add OTel conformance handlers 21–24 Oct 3, 2026
@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 3, 2026 00:57 — with GitHub Actions Active
Comment on lines +90 to +91
@durable_execution(plugins=[otel_plugin()])
def handler(event: dict[str, Any], context: DurableContext) -> str:

This comment was marked as outdated.

@github-actions

This comment has been minimized.

@zhongkechen zhongkechen changed the title test: add OTel conformance handlers 21–24 test: add otel context and replay conformance Oct 3, 2026
@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 3, 2026 02:08 — with GitHub Actions Active


@durable_execution(plugins=[otel_plugin()])
def handler(event: dict[str, Any], context: DurableContext) -> str:

This comment was marked as outdated.

@github-actions

This comment has been minimized.

@zhongkechen zhongkechen changed the title test: add otel context and replay conformance test: cover OTel replay and user callback contexts Oct 3, 2026
@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 3, 2026 02:26 — with GitHub Actions Active
@github-actions

This comment has been minimized.

@zhongkechen
zhongkechen changed the base branch from fix/otel-handler-context-428 to main October 3, 2026 02:37
@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 3, 2026 02:38 — with GitHub Actions Active
@github-actions

This comment has been minimized.

@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 3, 2026 03:02 — with GitHub Actions Active
@github-actions

This comment has been minimized.

@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 3, 2026 03:14 — with GitHub Actions Active
@github-actions

This comment has been minimized.

@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 3, 2026 05:20 — with GitHub Actions Active
@github-actions

This comment has been minimized.

@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 3, 2026 05:26 — with GitHub Actions Active
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Codex AI review

No actionable findings. Residual risk is limited to cloud-only conformance behavior, which was not executed during this read-only review.

Reviewed commit dd69e05728c60647aae76202321f5d34b605c00e. Workflow run

This branch was successfully deployed

1 active deployment
ai-pr-review-runtime — dd69e057 Deployed Oct 3, 2026 by zhongkechen via ai-pr-review / Codex review / Generate Codex review #1184
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.

1 participant