Repository navigation
fix(sdk): reject competing durable OTel views - #956
Merged
Merged
Conversation
zhongkechen
had a problem deploying
to
ai-pr-review-runtime
October 2, 2026 20:42 — with
GitHub Actions
Failure
This was referenced Oct 2, 2026
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
temporarily deployed
to
ai-pr-review-runtime
October 2, 2026 21:44 — with
GitHub Actions
Inactive
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 2, 2026 22:02 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 2, 2026 23:23 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 2, 2026 23:58 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
zhongkechen
had a problem deploying
to
ai-pr-review-runtime
October 3, 2026 01:46 — with
GitHub Actions
Error
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 3, 2026 01:54 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
zhongkechen
had a problem deploying
to
ai-pr-review-runtime
October 3, 2026 03:18 — with
GitHub Actions
Error
zhongkechen
had a problem deploying
to
ai-pr-review-runtime
October 3, 2026 03:37 — with
GitHub Actions
Error
2 of 4 tasks
zhongkechen
had a problem deploying
to
ai-pr-review-runtime
October 6, 2026 22:23 — with
GitHub Actions
Failure
nvasiu
reviewed
Oct 6, 2026
nvasiu
reviewed
Oct 6, 2026
added 6 commits
October 6, 2026 23:19
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 7, 2026 02:04 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
zhongkechen
had a problem deploying
to
ai-pr-review-runtime
October 7, 2026 17:24 — with
GitHub Actions
Error
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 7, 2026 17:24 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
nvasiu
reviewed
Oct 7, 2026
zhongkechen
temporarily deployed
to
ai-pr-review-runtime
October 7, 2026 19:15 — with
GitHub Actions
Inactive
Codex AI reviewNo actionable findings. Residual test risk: installed-package compatibility coverage exercises CommonJS consumers only; the equivalent ESM provider/layer path remains untested. Reviewed commit |
nvasiu
approved these changes
Oct 7, 2026
zhongkechen
added a commit
that referenced
this pull request
Oct 21, 2026
The shared LocalDurableTestRunner fix landed in #1020. This PR targets `main` and prepares Core 3.0 / OTel 2.0 with per-invocation plugin factories. The renamed Durable Execution Telemetry exporter retains upstream's `0.1.0-alpha.0` version and adopts the matching Core 3 contract. ### Issue Link, if available Refs #950. Related: #953, #954, #955, #956, #959, #960, #962, and #964. Business lifecycle cancellation and deadline handling remain tracked in #927/#1014. ### Description Handler-scoped plugin instances can mix concurrent Lambda Managed Instances executions. SDK 3.x accepts `createPlugin(info)` factories and constructs one plugin instance per invocation. Spans, operation maps, clocks, execution identity, and buffers belong to that invocation; providers, exporters, and environment initialization remain shared. Declared legacy v1 providers fail before the factory or handler runs. Factories may return null/undefined to skip an invocation; bundled factories retain concrete return types. Both OTel views preserve bounded finalization: synchronous child completion and parent finalization, current checkpoint ancestry, terminal ERROR status without invented exceptions, public global-provider delegate flushing, and one `flushTimeoutMillis` budget across all waits. Hooks freeze before the final provider wait. Closing one instance does not close another invocation; attempts admitted during the open drain phase retain their identity and are included in the final bounded batch. The Telemetry exporter likewise keeps invocation-local buffers and shared serialized exports. The change includes invocation-local X-Ray carriers, replay export suppression, fresh operation-update visibility, exclusive OTel views, and chained-invoke propagation through each invocation's factory instance. Carrier availability remains authoritative even when its value is empty, undefined, null, or invalid. Shared-LMI examples require a real runtime carrier. Initialization failure closes any known Invocation span best effort, leaves that instance inert, and does not shut down the shared provider. Physical span boundaries use invocation-local wall/monotonic correlation and `HrTime`; supplied backend Dates remain authoritative. Missing logical boundaries use millisecond precision, and a missing deferred start is bounded by a known completion. Already-recording attempts cannot retroactively move their start across arbitrary backend clock skew. The integration with upstream's Telemetry rename updates package names, imports, examples, and documentation while retaining the major factory API and invocation isolation. All 26 conformance handlers use factory registration. The reusable workflow discovers the pinned catalog and no longer receives the unsupported `case_count` input. Late completions during the open drain phase can outlive already-ended enclosing spans. Updates after finalization, exporter failure, or a frozen runtime have no delivery guarantee. No export acknowledgment is persisted, and the OTel factory does not cancel detached business work. ### Testing Validation on `65a3a036`, including upstream `5f0c707d`: - 3,256 tests passed: Core 1,448; OTel 791; Telemetry Exporter 114; Telemetry Core 385; MCP 406; VS Code 34; Desktop 48; peer compatibility 30. - Full workspace build, Telemetry host/webview builds, affected type checks, repository lint, and locked root/webview installs passed. - Packed Core 3.0.0 and Telemetry Exporter 0.1.0-alpha.0 passed strict CJS/ESM TypeScript checks with `skipLibCheck: false`. Both loaders passed concurrent real public-wrapper invocations and completed-step replay with a fake transport. Verified invocation isolation, serialized exports, final flush, and renamed exports/discriminator; no runtime network calls occurred. - Installed-consumer checks included the exporter's declared optional AWS peers. The inherited eager exporter imports still require those peers at root import time; this merge does not change that packaging limitation. No AWS cloud deployment was run locally for this merge. GitHub checks and workflows passed on `65a3a036`, including Build, Core and OTel conformance, CodeQL, and AI review. ### Demo/Screenshots Not applicable; public-handler, replay, installed-package, and concurrent-invocation regressions cover the behavior. ### Checklist - [x] Prepare the factory migration for the next major release - [x] GitHub checks passed on `65a3a036` - [ ] Required independent approval - [ ] Complete release notes and coordinated package publication --------- Co-authored-by: Frank Chen <[email protected]> Co-authored-by: Frank Chen <[email protected]>
This was referenced Oct 30, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
git diff --checkpass.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.