Skip to content

test: cover OTel replay, status and user callback contexts - #131

Open
zhongkechen wants to merge 13 commits into
mainfrom
test/otel-issue-456-conformance
Open

zhongkechen wants to merge 13 commits into
mainfrom
test/otel-issue-456-conformance

Conversation

@zhongkechen

@zhongkechen zhongkechen commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • 497 workspace tests; mypy over 51 files; Ruff, YAML lint and diff checks passed.
  • Wheel/sdist metadata/resources and isolated installed-wheel discovery passed.
  • All 52 packaged requirements pass the selector-schema audit.
  • Delayed-confirmation, inactive-branch/selector and catalog-corruption probes reproduced the original failures and pass with the fixes.
  • Resolver regressions execute the actual YAML Bash step and cover main/branch selection, immutable pins, invalid refs and API failures. Live read-only main and branch resolution passed.

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.

@github-actions

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 4, 2026 01:23 — with GitHub Actions Active
Comment thread packages/aws-durable-execution-conformance-tests-otel/tests/test_resources.py Outdated
@github-actions

This comment has been minimized.

@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 4, 2026 01:32 — with GitHub Actions Active
Comment thread packages/aws-durable-execution-conformance-tests-otel/tests/test_resources.py Outdated
@github-actions

This comment has been minimized.

@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 4, 2026 01:51 — with GitHub Actions Active
@github-actions

This comment has been minimized.

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

This comment has been minimized.

@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 6, 2026 02:08 — with GitHub Actions Active
Comment thread .github/workflows/opentelemetry-conformance-tests.yml
@github-actions

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Codex AI review

No actionable findings. Residual risk remains around live telemetry timing and external reusable-workflow/SDK integration behavior.

Reviewed commit 6182cee00ed33ce01e0579066fb31096f988817f. Workflow run

This branch was successfully deployed

1 active deployment
ai-pr-review-runtime — 6182cee0 Deployed Oct 6, 2026 by zhongkechen via ai-pr-review / Codex review / Generate Codex review #578
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