Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 26 additions & 7 deletions .agents/skills/release-preparation/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@ description: Preparing duroxide-python release pull requests. Use when bumping t

# Release Preparation

This skill prepares the repository changes for a release. Publishing is handled
by Microsoft's internal release infrastructure as described in
`RELEASE_POLICY.md`.
This skill covers release preparation, tagging, and GitHub release notes.
Only Microsoft's internal release pipeline publishes to PyPI, as described
in `RELEASE_POLICY.md`.

Do not publish to PyPI, create a GitHub Release, start the internal release
pipeline, or request publishing credentials.
Do not publish directly to PyPI, start the internal release pipeline, or
request publishing credentials.

## Prepare the Release

1. Confirm the target semantic version with the user if it was not provided.
Check runtime-floor and maintenance-line decisions against `RELEASE_POLICY.md`.
2. Set the same version in:
- `pyproject.toml` under `[project]`
- `Cargo.toml` under `[package]`
Expand All @@ -34,6 +35,9 @@ preparation.
Before presenting the changes:

- Confirm the versions in `pyproject.toml` and `Cargo.toml` match.
- For a runtime-floor change, check `requires-python` and the classifiers
against the PyO3 `abi3-py*` feature. Align `.github/workflows/build.yml`,
`ci/validate_artifacts.py`, its tests, and the install, smoke and upgrade docs.
- Confirm the changelog version and date are correct.
- Confirm the diff contains only the intended release preparation.

Expand All @@ -56,6 +60,21 @@ After the pull request is merged:
4. Confirm the `v`-prefixed tag does not already exist locally or on `origin`.
5. Create the tag on the recorded merge SHA and push it to `origin`.

For example, package version `0.1.29` uses tag `v0.1.29`. Treat release tags as
immutable; never move or reuse an existing tag. Never substitute the current
Use `vX.Y.Z` for package version `X.Y.Z`. Never move or reuse a tag or substitute the current
`origin/main` or `HEAD` tip for the release pull request's merge SHA.

## Publish GitHub Release Notes

1. Use the tagged `CHANGELOG.md` entry, including upgrade notes. The developer's
request to publish authorizes the notes; ask if before/after PyPI timing is
unclear. For early notes, add “PyPI publication pending” and update that
line on publication or abandonment. Otherwise verify the expected files on PyPI first.
2. Verify the tag on `origin` resolves to the approved merge SHA, peeling
annotated tags. Stop on a missing or mismatched tag; never create or move
one here. If a release exists, verify it instead of creating another.
3. Run `gh release create "$tag" --verify-tag --notes-file "$notes" --latest="$latest"`
without assets. Set `latest=true` only for the highest stable version; for
prereleases use `--prerelease --latest=false`.
4. Check `gh release view "$tag" --json tagName,isDraft,isPrerelease,body,assets`
for the expected tag, public notes, prerelease status and empty assets;
verify Latest separately. Stop on discrepancies rather than overwriting a release.
43 changes: 26 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
check-latest: true
- name: Install configured Rust toolchain
run: |
test -f rust-toolchain.toml
Expand All @@ -57,6 +58,7 @@ jobs:
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
check-latest: true
- name: Require Rust toolchain configuration
run: test -f rust-toolchain.toml
- name: Build wheel
Expand All @@ -69,6 +71,7 @@ jobs:
with:
name: wheels-macos-${{ matrix.target }}
path: dist/*.whl
if-no-files-found: error

# ── Linux (x86_64 + aarch64, manylinux) ───────────────────
linux:
Expand All @@ -85,6 +88,7 @@ jobs:
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
check-latest: true
- name: Require Rust toolchain configuration
run: test -f rust-toolchain.toml
- name: Build wheel
Expand All @@ -109,6 +113,7 @@ jobs:
with:
name: wheels-linux-${{ matrix.target }}
path: dist/*.whl
if-no-files-found: error

# ── Windows (x86_64) ─────────────────────────────────────────
windows:
Expand All @@ -121,6 +126,7 @@ jobs:
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
check-latest: true
- name: Require Rust toolchain configuration
shell: bash
run: test -f rust-toolchain.toml
Expand All @@ -134,6 +140,7 @@ jobs:
with:
name: wheels-windows-${{ matrix.target }}
path: dist/*.whl
if-no-files-found: error

# ── Source distribution ─────────────────────────────────────
sdist:
Expand All @@ -151,11 +158,28 @@ jobs:
with:
name: wheels-sdist
path: dist/*.tar.gz
if-no-files-found: error

validate-artifacts:
runs-on: ubuntu-latest
needs: [macos, linux, windows, sdist]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.12"
check-latest: true
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: wheels-*
merge-multiple: true
path: dist
- run: python ci/validate_artifacts.py dist

# ── Packaging smoke: install wheel into fresh venv on real OSes ──
smoke-local:
name: Smoke (local) ${{ matrix.os }} py${{ matrix.python }}
needs: [macos, linux, windows]
needs: validate-artifacts
env:
PIP_ONLY_BINARY: duroxide
strategy:
Expand All @@ -174,28 +198,13 @@ jobs:
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python }}
check-latest: true
- name: Download wheels
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: wheels-*
merge-multiple: true
path: wheels
- name: List wheels
shell: bash
run: |
ls -lh wheels/
shopt -s nullglob
wheels=(wheels/*.whl)
if (( ${#wheels[@]} == 0 )); then
echo "::error::No wheel artifacts found"
exit 1
fi
for wheel in "${wheels[@]}"; do
[[ "$wheel" == *-cp311-abi3-*.whl ]] || {
echo "::error file=$wheel::Expected a cp311-abi3 wheel"
exit 1
}
done
- name: Run smoke (local wheel)
if: runner.os != 'Windows'
env:
Expand Down
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- The SDK now requires CPython 3.11 or newer; Python 3.9 and 3.10 are no
longer supported. Wheels use the `cp311-abi3` tag, and the CI smoke test
matrix covers standard CPython 3.11 through 3.15.
- Starting with 0.4.0, duroxide requires CPython 3.11 or newer and ships
`cp311-abi3` wheels. The minimum for 0.3.0 remains CPython 3.9. Upgrade
Python before upgrading duroxide: on 3.9 or 3.10, `pip install -U duroxide`
may stay on 0.3.0 without an error.

## [0.3.0] - 2026-11-30

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ Write durable workflows as Python generators. The Rust runtime handles replay, p
pip install duroxide
```

Starting with 0.4.0, duroxide requires CPython 3.11 or newer. The minimum
for 0.3.0 is CPython 3.9. On CPython
3.9 or 3.10, `pip install -U duroxide` may leave 0.3.0 installed rather than
report an error. Upgrade Python before installing 0.4.0.

Prebuilt wheels are published for macOS arm64/x64, Linux manylinux x86_64 and
aarch64, and Windows x86_64.

Expand Down Expand Up @@ -253,6 +258,8 @@ reply = json.loads(status.custom_status)

## Development

Requires CPython 3.11 or newer.

Install Rust through [rustup](https://rustup.rs/). The root `rust-toolchain.toml`
selects the compiler for local builds and GitHub Actions, including wheel builds
inside manylinux containers.
Expand Down
26 changes: 19 additions & 7 deletions RELEASE_POLICY.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
# Release Policy

`duroxide` is published to PyPI by Microsoft's internal open-source release
infrastructure. Publishing credentials and release execution remain outside
this repository.
Microsoft's internal release pipeline publishes `duroxide` to PyPI. Publishing
credentials and package builds for PyPI remain outside this repository.

## Contributor Workflow

Contributors can prepare a release through a pull request:

1. Update the version in `pyproject.toml` and `Cargo.toml`.
2. Update `CHANGELOG.md` and relevant documentation.
3. Confirm the pull request's `Build & Smoke` workflow passes.
4. Open a pull request for review.
3. Open a pull request for review and confirm `Build & Smoke` passes.

After the release change is merged, the matching release tag is created from
the release pull request's exact merge commit with explicit approval. A
Microsoft maintainer then uses that tag with the internal release pipeline to
build and publish the package to PyPI.

## CPython support

The minimum CPython version in `pyproject.toml` must match the PyO3 ABI
minimum in `Cargo.toml`. While the SDK is at 0.x, changing that minimum
requires at least a minor release. The current flow does not support
maintenance releases from older lines; those require a separately approved plan.

## GitHub Release Notes

Every new SDK version tag requires a notes-only GitHub Release. Existing tags
and releases remain unchanged. The release maintainer publishes the tagged
changelog and upgrade notes before or after PyPI publication, as requested by
the developer. Publishing notes requires explicit authorization separate from
tag approval. Do not upload package assets or trigger PyPI publication.

## Publishing Boundary

- Do not publish directly to PyPI for the Microsoft release.
- Do not create a GitHub Release manually.
- Publish to PyPI only through Microsoft's internal release pipeline.
- Do not request or store Microsoft publishing credentials in this repository.

For release questions, open a GitHub issue without including credentials or
Expand Down
7 changes: 7 additions & 0 deletions ci/smoke/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ Cross-platform smoke tests that exercise the **distributable** `duroxide` Python
wheel — not the source tree. Installs into a fresh venv, resolves platform tags,
runs a minimal SQLite-backed orchestration.

Starting with 0.4.0, duroxide requires CPython 3.11 or newer. CI checks the
wheels built by this repository's GitHub workflow for `cp311-abi3` tags and
checks the wheels and sdist for `Requires-Python: >=3.11`. The smoke matrix
installs those wheels on standard CPython 3.11 through 3.15. Version 0.3.0
requires only CPython 3.9; a registry upgrade on 3.9 or 3.10 may select it
instead of the newer release.

Kept in lockstep with `sdks/duroxide-node/ci/smoke/`. The duroxide-update-manager
agent owns parity. See its instructions for the full checklist.

Expand Down
56 changes: 56 additions & 0 deletions ci/validate_artifacts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
"""Check the wheels and sdist built by the GitHub workflow before smoke testing."""

import re
import sys
import tarfile
import tomllib
from email.parser import BytesParser
from pathlib import Path
from zipfile import BadZipFile, ZipFile


def check_floor(metadata: bytes, path: Path) -> None:
headers = BytesParser().parsebytes(metadata, headersonly=True)
floors = headers.get_all("Requires-Python", [])
if floors != [">=3.11"]:
raise ValueError(f"{path.name}: expected one Requires-Python: >=3.11, got {floors!r}")


def validate(directory: Path, version: str) -> None:
stem = f"duroxide-{version}"
wheels = sorted(directory.glob("*.whl"))
if len(wheels) != 5: # Two macOS, two Linux, one Windows.
raise ValueError(f"{directory}: expected five wheels, found {[p.name for p in wheels]}")
for path in wheels:
if not re.fullmatch(rf"{re.escape(stem)}-cp311-abi3-[a-z0-9_]+(?:\.[a-z0-9_]+)*\.whl", path.name):
raise ValueError(f"{path.name}: expected {stem}-cp311-abi3-<platform>.whl")
try:
with ZipFile(path) as wheel:
entries = [p for p in wheel.namelist() if re.fullmatch(r"[^/]+\.dist-info/METADATA", p)]
if entries != [f"{stem}.dist-info/METADATA"]:
raise ValueError(f"{path.name}: expected one top-level {stem}.dist-info/METADATA, got {entries!r}")
check_floor(wheel.read(entries[0]), path)
except BadZipFile as exc:
raise ValueError(f"{path.name}: {exc}") from exc

path = directory / f"{stem}.tar.gz"
sdists = list(directory.glob("*.tar.gz"))
if sdists != [path]:
raise ValueError(f"{directory}: expected only {path.name}, found {[p.name for p in sdists]}")
try:
with tarfile.open(path, "r:gz") as sdist:
entries = [m for m in sdist if m.name == f"{stem}/PKG-INFO"]
if len(entries) != 1 or not entries[0].isfile():
raise ValueError(f"{path.name}: expected one regular {stem}/PKG-INFO")
check_floor(sdist.extractfile(entries[0]).read(), path)
except (tarfile.TarError, EOFError) as exc:
raise ValueError(f"{path.name}: {exc}") from exc


if __name__ == "__main__":
with Path(__file__).resolve().parents[1].joinpath("pyproject.toml").open("rb") as manifest:
version = tomllib.load(manifest)["project"]["version"]
try:
validate(Path(sys.argv[1]), version)
except ValueError as exc:
sys.exit(str(exc))
5 changes: 5 additions & 0 deletions docs/user-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ This guide covers how to build workflows with duroxide-python. For architecture
pip install duroxide
```

Starting with 0.4.0, duroxide requires CPython 3.11 or newer. The minimum
for 0.3.0 is CPython 3.9. On 3.9 or 3.10, pip skips
incompatible releases, so `pip install -U duroxide` may stay on 0.3.0.
No further 0.3.x releases are planned through the current release pipeline.

## Core Concepts

| Concept | What It Is |
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ python-source = "python"
module-name = "duroxide._duroxide"

[tool.pytest.ini_options]
pythonpath = ["."]
testpaths = ["tests"]
Loading
Loading