Skip to content

fix(sdk): reject competing durable OTel views - #956

Merged
zhongkechen merged 25 commits into
mainfrom
fix/otel-exclusive-views-943
Oct 7, 2026
Merged

zhongkechen merged 25 commits into
mainfrom
fix/otel-exclusive-views-943

Conversation

@zhongkechen

@zhongkechen zhongkechen commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Reject competing bundled OTel views across explicit and environment configuration. The loader validates all declared provider types before calling any environment-selected factory, so a conflicting dynamic pair cannot install sampler or ID-generator wrappers on the global tracer. Diagnostics identify the concrete plugin classes, including subclasses.

The bundled views declare inherited static metadata through a namespaced symbol shared across package copies. The base hook interface and ordinary plugin properties remain unchanged. Existing instance metadata remains supported, and returned instances are checked too so a v1 provider that declares a broader base class cannot bypass exclusivity. Explicit instances have already been constructed by the application before registration; validation cannot undo that construction.

Compatibility stays additive: provider API version 1 and handler-scoped factory calls remain unchanged. OTel's core peer stays optional (>=2.4.0 <3.0.0), including separate OTel-only layers beside a released core. The new exclusivity guarantee requires the coordinated core 2.7 / OTel 1.2 pair. The per-invocation factory migration remains separate in #924.

Validation:

  • All 107 core suites / 1,292 tests pass.
  • All 38 focused OTel composed and installed-consumer tests pass, covering both dynamic orders, mixed/explicit configuration, preserved global tracer fields, inherited subclass groups/names, valid single views, released/current package combinations, strict declarations and separate layers.
  • Seven new regression cases fail against the previous runtime and pass with the fix.
  • Core/OTel ESM, CJS and declaration builds, both package type checks, root Biome (1,177 files), and git diff --check pass.

The branch retains the shared bounded deployment/read-retry and scheduler-sensitive example fixture repairs from #959. Installed-consumer setup rebuilds candidate packages before packing to avoid stale outputs. Cloud checks run through PR CI; no packages were published.

Fixes #943.

zhongkechen added a commit that referenced this pull request Oct 2, 2026
The JS caller grants `contents: read`, but the pinned reusable AI-review
workflow requests `contents: write` for activity/publication jobs.
GitHub rejects the workflow before review generation; [this
run](https://github.com/aws/aws-durable-execution-sdk-js/actions/runs/37062142944)
reports that the nested job is requesting write while the caller allows
only read.

Grant `contents: write` to the reusable-workflow call, matching its
declared requirements and the Java/Python callers. The review generation
job retains its own narrower contents grant.

Validation: parsed the YAML and compared the before/after structures;
the only change is this permission value. Checked the pinned reusable
workflow and exact GitHub startup diagnostic; `git diff --check` passed.
This configuration-only change does not alter SDK code.

This must reach the trusted base/default branch before the blocked
automatic reviews for #953, #954, #955 and #956 can start. No successful
Actions execution is claimed from the PR-head change alone.
@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 2, 2026 21:44 — with GitHub Actions Active
@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 2, 2026 22:02 — with GitHub Actions Active
@github-actions

This comment has been minimized.

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

This comment has been minimized.

@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 2, 2026 23:58 — with GitHub Actions Active
@github-actions

This comment has been minimized.

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

This comment has been minimized.

@github-actions

This comment has been minimized.

@zhongkechen
zhongkechen had a problem deploying to ai-pr-review-runtime October 6, 2026 22:23 — with GitHub Actions Failure
Comment thread packages/aws-durable-execution-sdk-js/src/types/plugin.ts
@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 7, 2026 02:04 — with GitHub Actions Active
@github-actions

This comment has been minimized.

@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 7, 2026 17:24 — with GitHub Actions Active
Comment thread .github/workflows/scripts/setup-node22.test.sh
@github-actions

This comment has been minimized.

Comment thread packages/aws-durable-execution-sdk-js/src/utils/plugin/plugin-loader.ts Outdated
@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 7, 2026 19:15 — with GitHub Actions Active
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Codex AI review

No actionable findings. Residual test risk: installed-package compatibility coverage exercises CommonJS consumers only; the equivalent ESM provider/layer path remains untested.

Reviewed commit 4dfe43018835cbdff184252fcdcd1afaa77e6b3f. Workflow run

@zhongkechen
zhongkechen merged commit 19ee19f into main Oct 7, 2026
42 checks passed
@zhongkechen
zhongkechen deleted the fix/otel-exclusive-views-943 branch October 7, 2026 20:34

This branch was successfully deployed

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

[Bug]: enabling both OTel views is accepted without mutual-exclusion validation

2 participants