Skip to content

chore: prepare Python minor releases - #764

Open
zhongkechen wants to merge 15 commits into
mainfrom
release/python-minor-20261008
Open

zhongkechen wants to merge 15 commits into
mainfrom
release/python-minor-20261008

Conversation

@zhongkechen

@zhongkechen zhongkechen commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Prepare the coordinated Python SDK 2.1 / OTel 1.1 / testing 1.3 release. This PR changes only the testing-package version from 1.2.1 to 1.3.0; it does not cherry-pick unmerged implementation work.

Package PyPI snapshot verified October 13 Prepared version
SDK 2.0.1 2.1.0, already on main
OTel 1.0.0 1.1.0, already on main
Testing 1.2.1 1.3.0, this PR

Head 9315e8fc20573e11a4dab020e5b970b0ad858090 includes main d77d13e6deedf1d57ab3de3047cb597f074da7ef, including the Telemetry Exporter rename and the merged revoked-token/local pause-resume changes. OTel/testing implementation and release version changes are preserved; the PR remains only a testing-package version bump relative to current main. The layer SDK pin is already 2.1.0. Production dependency floors are unchanged by this version bump. RELEASING.md describes the intended combined tag sdk-v2.1.0,otel-v1.1.0,testing-v1.3.0; creating or publishing that release is a separate action after the final gates below.

Draft release notes

SDK 2.1.0

OTel 1.1.0

Telemetry completion metadata can be redelivered after an invocation or checkpoint transport failure without a successful response acknowledgment. There is no exporter acknowledgment in durable state, so #758 does not promise exactly-once telemetry across failed/redelivered invocations. This does not mean already-checkpointed step bodies run again; no global exported-operation cache is used to discard a first delivery after a failed attempt.

Testing 1.3.0

  • Merged: experimental local pause_execution() / resume_execution() and paused-checkpoint simulation (fix(sdk): answer PENDING on revoked token #757). The cloud runner reports these operations as not implemented; it does not send a pause/resume service request.

  • Pending prerequisite fix(otel): isolate invocations and replay telemetry #758 reports callback success/failure/timeout through UpdatedOperationIds, acknowledges invocation-input delivery after a valid response while retaining newer updates and retry delivery, and preserves detailed empty-error history while reconstructing absent-error operation state consistently.

  • Main also contains virtual-clock, per-execution worker and local chained-invoke improvements since the published 1.2.1 artifact.

Remaining release gates

Compatibility preparation #774 was intentionally closed unmerged after discussion with the author; the closing decision defers its three metadata-reader fallbacks to the next major release. This Core 2.x minor release retains the existing OperationSubType enum contract, and the testing checkpoint/history parsers still require known enum labels. Those fallbacks add no behavior for the supported Core 2.x subtype contract, so #774 is explicitly no longer a prerequisite for this minor release. This does not provide custom-string subtype support or waive the implementation, conformance or final integrated release gates below.

Validation and boundary

Main 01c7b4695d605b4773a9110fc8cd190b18985a73 (#790) is integrated. The retry test now uses a real execution and checks retry count, backoff, completion and final result; malformed-output tests retain explicit non-paused state and check that the invoker ran. The three changed tests match upstream, and all other test logic is preserved. Each composed branch passed 135 executor tests, testing type checks and formatting. All runtime sources, qualified conformance references and dependency floors are unchanged; the earlier full runtime and installed-plugin evidence still applies to those identical sources. New-head CI runs separately.

Main 720949e5968eb98098053d8091a658e74efb0838 (#777) is integrated: the testing runner fails malformed or otherwise invalid non-PENDING outputs immediately; PENDING with no pending operations has a three-attempt retry budget. The initial fixture correction set pause/deferred state explicitly; upstream #790 now supplies real execution state for retry coverage and keeps explicit pause guards for malformed-output coverage. This composed branch passed 1702 testing tests, testing type/format checks and exact-source composition checks. Core, OTel, workflow references and package/dependency versions are unchanged. New-head GitHub CI runs separately.

Main 3eee4d7b6529ca9db58c265656f7fba8498b010e workflow updates are integrated. All package/runtime/test sources are byte-for-byte unchanged from the preceding branch head. Ten focused workflow tests, YAML parsing and caller/source checks passed. The OTel workflow uses the upstream 2387bb48 pin; its caller inputs, test ref and resource queues are unchanged. New-head GitHub CI runs separately.

Historical head a7fd58e passed all five workflows: Python package (38486515047), Cloud tests (38486515069), JS Examples (38486515035), CodeQL (38486514000), and AI PR Review (38486515753). The AI review reported no actionable findings; it is not a submitted approval. Those results are historical. Historical head 545db366 passed all five workflows: Python package (38623127133), Cloud tests (38623127148), JS Examples (38623127120), CodeQL (38623119626), and AI PR Review (38623124798, attempt 2 after one targeted activity-recording retry). The base merge passed 98 extras tests and all 87 script tests selected by the workflow. A broader local script run also reproduced one unchanged, pre-existing lint-subject test mismatch. These checks do not validate unmerged prerequisites or replace final release validation.

Historical head 36af7f44 added main #776's Extras HTTP-delivery changes and passed 187 affected Extras tests with 17-file type/format checks. Historical head f819b414 additionally incorporates main #779's MicroVM-session changes: 257 affected Extras tests and 21-file type/format checks passed. Core, OTel, testing, workflow and version-metadata trees are unchanged from 36af7f44. Current-head CI and the final integrated release gates above remain separate validation.

Base integration 9315e8fc20573e11a4dab020e5b970b0ad858090 incorporates main d77d13e6deedf1d57ab3de3047cb597f074da7ef (#757): Core returns PENDING when the checkpoint token is revoked, and the local testing runner supports experimental pause/resume. Paused checkpoints preserve accepted updates while withholding further checkpoint permission; resume continues from durable state. This composed branch passed 4258 Core/testing/OTel tests + 5 subtests; all3component typechecks,Core/testing fmt and exact-source imports passed. The existing PR changes are preserved; OTel, plugin registration/notification code, handlers, workflow/test references and dependency floors are unchanged by this base integration. GitHub CI for the new head runs separately. No tag, package, layer or release is published.

The original release-preparation preflight on ef683592 plus the version bump built wheels/source distributions with Hatch 1.16.5 and Python 3.13.15, verified versions/dependencies/Python floors/LICENSE/NOTICE, checked the OTel wheel contract and layer pin, and passed 18 metadata/layer/wheel tests. That remains historical preparation evidence, not a fresh build of the eventual final release commit.

No tag, GitHub Release, PyPI package or Lambda layer publication is performed by this PR preparation.

@yaythomas

Copy link
Copy Markdown
Contributor

before next release, please let's double-check how operation type works the type out from the subtype in plugin, since this is a plugin change it could probably do with going out in the same release. still investigating.

@zhongkechen

zhongkechen commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor Author

@yaythomas I checked this and opened #768. Checkpoint-backed plugin hooks already use the explicit operation type, but local hooks could fall back to inferring it from subtype. #768 removes that fallback and OperationType.from_sub_type: OperationIdentifier now requires operation_type=, and every operation creator supplies it.

The new tests cover built-in operations across suspension/replay and checkpointed/virtual children whose subtype differs from their type. Core (1,821), OTel (668), and Insight (157) tests pass locally, with 98.33% core coverage; type checking and lint also pass. CI is still running.

Requiring operation_type= and removing OperationType.from_sub_type are source-breaking for callers that use those lower-level helpers directly. If these changes are considered non-breaking under the SDK's supported API contract, I recommend including #768 in the minor release; otherwise, it should go in a major release. #762 separately addresses loading unknown subtype values.

@zhongkechen
zhongkechen marked this pull request as ready for review October 13, 2026 19:31
@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 13, 2026 19:31 — with GitHub Actions Active
@zhongkechen
zhongkechen deployed to ai-pr-review-runtime October 13, 2026 19:53 — with GitHub Actions Active
@github-actions

This comment has been minimized.

@yaythomas

yaythomas commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

agree minor release is fine here.

this #749 change to make OperationSubType a str could impact Otel also, so we might want to consider making this 1st to avoid release churn?

Before we release, OTel and testing should accept a subtype that is a plain string.

If we make this change now, #749 won't need another OTel or testing release.

Change:

  • OTel, in execution_plugin.py and invocation_plugin.py: replace info.sub_type.value with getattr(info.sub_type, "value", info.sub_type).
  • Testing, in model.py: make the same replacement in the sub_type property. In the two places that parse with OperationSubType(...), keep the raw string when the value isn't a member.

Effect today: none. For every subtype the SDK records today, the new code returns the same value.

@zhongkechen

zhongkechen commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor Author

@yaythomas #774 is now limited to metadata-read preparation in commit 1c2158d: the two OTel attribute builders and testing's history-event projection accept enum values or plain-string labels. Core and testing public subtype declarations remain unchanged.

The earlier claim in this reply that unknown labels are accepted by the checkpoint/typed-history parsers is withdrawn. Real endpoint validation found that passing an unknown string into the current core model can consume an in-memory checkpoint token before serialization fails; returning that string as an enum-typed history result also violates the declared contract. Both parser fallbacks have therefore been removed and are deferred until the core parsing, serialization, replay and public type work in issue #749 can be coordinated. Existing enum parsing and known-label identity are preserved.

The testing suite passes 1,615 tests; the final 210 focused exporter/history/endpoint tests and six-file type check pass, including state/token/retry controls on memory, filesystem and SQLite stores and an existing typed .value caller. The new head's CI is pending. #774 remains a separate preparation dependency for this release; it does not implement the full custom-subtype feature.

@github-actions

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

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

Copy link
Copy Markdown
Contributor

Codex AI review

No actionable findings. The sole change bumps the testing package from 1.2.1 to 1.3.0, consistent with its Hatch version configuration. Tests and package builds were not run under the read-only review constraints.

Reviewed commit 476bb9e681273421ca497192d5b8263e60c6beb5. Workflow run

This branch was successfully deployed

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

2 participants