Skip to content

test(otel): preserve factory registration metadata (#891) - #903

Closed
srivilliamsai wants to merge 2 commits into
aws:mainfrom
srivilliamsai:test/preserve-otel-factory-metadata
Closed

srivilliamsai wants to merge 2 commits into
aws:mainfrom
srivilliamsai:test/preserve-otel-factory-metadata

Conversation

@srivilliamsai

Copy link
Copy Markdown

Issue #, if available

Fixes #891

Description of changes

Preserve OTel registration metadata in test factory wrappers so that wrapper factories participate in exclusive-group validation.

  • Add _RecordingOtelFactory declaring __durable_registration_api__ = 1 and exclusive_group = "aws-durable-execution-otel-view" in OTel tests while leaving generic helpers for unrelated plugins unmarked.
  • Add inherited and composed test factory wrappers in test_view_registration.py.
  • Add tests verifying that competing wrapped views in both orders raise PluginLoadError without invoking plugin creation, lifecycle hooks, or user code.
  • Add test verifying that a single wrapped view with an unrelated plugin remains valid.
  • Zero changes to production SDK or OTel plugin runtime code.

Design

See Rules for every change.

  • Design note (rule 3): Not needed (test-only change, no public API changes).
  • Simpler options considered (rule 2): Maintained explicit class metadata on OTel-specific wrappers rather than attempting runtime introspection or altering production discovery.
  • Root cause (rule 5): Test factory wrappers delegated create_plugin without preserving class-level registration metadata.
  • Net change in source lines and in public API members: +230 lines across test files, 0 public API changes.

Assumptions

  • Test wrappers representing an OTel factory should either inherit from the built-in factories or declare the registration marker and exclusive group at class level.

Decisions not covered by the issue or the design note

  • None.

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.

Preserve OTel registration metadata in test factory wrappers (aws#891)
@srivilliamsai
srivilliamsai deployed to ai-pr-review-runtime November 3, 2026 17:23 — with GitHub Actions Active
@SilanHe

SilanHe commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Hello @srivilliamsai, thank you for your contribution. It appears we've closed #891 in another PR already.

@SilanHe SilanHe closed this Nov 19, 2026
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.

[Tests]: Preserve OTel registration metadata in factory wrappers

2 participants