duroxide 0.1.28__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {duroxide-0.1.28 → duroxide-0.2.1}/.agents/skills/pyo3-interop/SKILL.md +4 -4
- duroxide-0.2.1/.agents/skills/release-preparation/SKILL.md +61 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/.github/copilot-instructions.md +2 -0
- duroxide-0.1.28/.github/workflows/publish.yml → duroxide-0.2.1/.github/workflows/build.yml +55 -117
- {duroxide-0.1.28 → duroxide-0.2.1}/CHANGELOG.md +108 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/Cargo.lock +132 -133
- {duroxide-0.1.28 → duroxide-0.2.1}/Cargo.toml +3 -3
- {duroxide-0.1.28 → duroxide-0.2.1}/PKG-INFO +11 -1
- {duroxide-0.1.28 → duroxide-0.2.1}/README.md +10 -0
- duroxide-0.2.1/RELEASE_POLICY.md +28 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/docs/architecture.md +8 -8
- {duroxide-0.1.28 → duroxide-0.2.1}/docs/user-guide.md +55 -1
- {duroxide-0.1.28 → duroxide-0.2.1}/pyproject.toml +1 -1
- {duroxide-0.1.28 → duroxide-0.2.1}/python/duroxide/context.py +28 -17
- duroxide-0.2.1/rust-toolchain.toml +6 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/src/handlers.rs +85 -113
- {duroxide-0.1.28 → duroxide-0.2.1}/src/lib.rs +24 -26
- {duroxide-0.1.28 → duroxide-0.2.1}/src/runtime.rs +60 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/tests/test_kv_store.py +36 -0
- duroxide-0.2.1/tests/test_lock_options.py +116 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/tests/test_races.py +266 -0
- duroxide-0.2.1/tests/test_replay_isolation.py +198 -0
- duroxide-0.1.28/.agents/skills/pypi-publish/SKILL.md +0 -208
- {duroxide-0.1.28 → duroxide-0.2.1}/.agents/skills/duroxide-python-orchestrations/SKILL.md +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/.env.example +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/.github/dependabot.yml +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/.gitignore +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/CODE_OF_CONDUCT.md +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/CONTRIBUTING.md +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/LICENSE +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/SECURITY.md +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/ci/smoke/README.md +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/ci/smoke/run-local.ps1 +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/ci/smoke/run-local.sh +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/ci/smoke/run-registry.ps1 +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/ci/smoke/run-registry.sh +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/ci/smoke/smoke.py +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/python/duroxide/__init__.py +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/python/duroxide/driver.py +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/src/client.rs +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/src/pg_provider.rs +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/src/provider.rs +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/src/types.rs +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/tests/scenarios/__init__.py +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/tests/scenarios/test_toygres.py +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/tests/test_admin_api.py +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/tests/test_advanced_features.py +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/tests/test_async_blocks.py +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/tests/test_copilot_chat.py +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/tests/test_e2e.py +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/tests/test_init_tracing.py +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/tests/test_sessions.py +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/tests/test_tags.py +0 -0
- {duroxide-0.1.28 → duroxide-0.2.1}/tests/test_typed_apis.py +0 -0
|
@@ -97,7 +97,7 @@ fn call_create_blocking(&self, payload: String) -> Result<GeneratorStepResult, S
|
|
|
97
97
|
Rust (tokio thread) Python (GIL)
|
|
98
98
|
─────────────────── ────────────────────
|
|
99
99
|
1. invoke(ctx, input)
|
|
100
|
-
├─ Store ctx in ORCHESTRATION_CTXS[
|
|
100
|
+
├─ Store ctx in ORCHESTRATION_CTXS[token] // token = "orch-{n}", new for every invocation
|
|
101
101
|
├─ call_create_blocking(payload) ──────► create_generator(payload)
|
|
102
102
|
│ (block_in_place + with_gil) ├─ Create OrchestrationContext
|
|
103
103
|
│ ├─ Create generator: fn(ctx, input)
|
|
@@ -111,7 +111,7 @@ Rust (tokio thread) Python (GIL)
|
|
|
111
111
|
│ │ └─ Return next task or completion
|
|
112
112
|
│ │◄────────────────────────────────────┘
|
|
113
113
|
│ └─ If completed/error: break
|
|
114
|
-
└─ Remove ctx from ORCHESTRATION_CTXS
|
|
114
|
+
└─ Remove ctx from ORCHESTRATION_CTXS[token]
|
|
115
115
|
```
|
|
116
116
|
|
|
117
117
|
## Activity Interop (Synchronous GIL Call)
|
|
@@ -148,7 +148,7 @@ static ORCHESTRATION_CTXS: LazyLock<Mutex<HashMap<String, OrchestrationContext>>
|
|
|
148
148
|
```python
|
|
149
149
|
# In OrchestrationContext (fire-and-forget, no yield)
|
|
150
150
|
def trace_info(self, message):
|
|
151
|
-
orchestration_trace_log(self.
|
|
151
|
+
orchestration_trace_log(self._ctx_token, "info", str(message))
|
|
152
152
|
|
|
153
153
|
# In ActivityContext (fire-and-forget)
|
|
154
154
|
def trace_info(self, message):
|
|
@@ -160,7 +160,7 @@ def trace_info(self, message):
|
|
|
160
160
|
1. **Never expose `is_replaying` to Python** — Rust `OrchestrationContext.trace()` handles suppression
|
|
161
161
|
2. **Always use global maps, not thread-locals** — Python runs on a different thread
|
|
162
162
|
3. **Clean up map entries on ALL exit paths** — leaked entries cause stale traces
|
|
163
|
-
4. **Use atomic tokens for activities** (
|
|
163
|
+
4. **Use atomic tokens for activities and for orchestrations** (never instance_id) — multiple activities for the same instance can run concurrently, and two replays of one instance can be alive in the same process (a replay that lost its lock keeps running until its commit is rejected). Rust passes the orchestration token in `ctxInfo["_ctxToken"]`; `OrchestrationContext` sends it back on every synchronous native call
|
|
164
164
|
|
|
165
165
|
## ScheduledTask Protocol
|
|
166
166
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: release-preparation
|
|
3
|
+
description: Preparing duroxide-python release pull requests. Use when bumping the package version, updating release notes, or preparing a new PyPI release.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Release Preparation
|
|
7
|
+
|
|
8
|
+
This skill prepares the repository changes for a release. Publishing is handled
|
|
9
|
+
by Microsoft's internal release infrastructure as described in
|
|
10
|
+
`RELEASE_POLICY.md`.
|
|
11
|
+
|
|
12
|
+
Do not publish to PyPI, create a GitHub Release, start the internal release
|
|
13
|
+
pipeline, or request publishing credentials.
|
|
14
|
+
|
|
15
|
+
## Prepare the Release
|
|
16
|
+
|
|
17
|
+
1. Confirm the target semantic version with the user if it was not provided.
|
|
18
|
+
2. Set the same version in:
|
|
19
|
+
- `pyproject.toml` under `[project]`
|
|
20
|
+
- `Cargo.toml` under `[package]`
|
|
21
|
+
3. Move the relevant entries from `CHANGELOG.md`'s `[Unreleased]` section into
|
|
22
|
+
a section named for the target version and current date.
|
|
23
|
+
4. Keep an empty `[Unreleased]` section above the new release entry.
|
|
24
|
+
5. Update directly related documentation when the release changes documented
|
|
25
|
+
behavior.
|
|
26
|
+
6. Confirm `Cargo.toml` uses registry versions for `duroxide` and
|
|
27
|
+
`duroxide-pg`, with no local path overrides or `[patch.crates-io]` section.
|
|
28
|
+
|
|
29
|
+
Do not invent changelog entries or include unrelated changes in the release
|
|
30
|
+
preparation.
|
|
31
|
+
|
|
32
|
+
## Validate the Preparation
|
|
33
|
+
|
|
34
|
+
Before presenting the changes:
|
|
35
|
+
|
|
36
|
+
- Confirm the versions in `pyproject.toml` and `Cargo.toml` match.
|
|
37
|
+
- Confirm the changelog version and date are correct.
|
|
38
|
+
- Confirm the diff contains only the intended release preparation.
|
|
39
|
+
|
|
40
|
+
## Create the Release Pull Request
|
|
41
|
+
|
|
42
|
+
Commit the release preparation, push the branch, and create a pull request.
|
|
43
|
+
Check that its `Build & Smoke` workflow passes. Do not merge the pull request
|
|
44
|
+
on the user's behalf.
|
|
45
|
+
|
|
46
|
+
## Tag the Merged Release
|
|
47
|
+
|
|
48
|
+
After the pull request is merged:
|
|
49
|
+
|
|
50
|
+
1. Resolve the pull request's exact merge commit SHA from GitHub and confirm
|
|
51
|
+
the pull request state is `MERGED`.
|
|
52
|
+
2. Fetch `origin/main`, confirm the merge SHA is contained in it, and verify the
|
|
53
|
+
package and changelog versions at that exact commit.
|
|
54
|
+
3. Ask the user for explicit approval to create and push the release tag. Prior
|
|
55
|
+
approval to prepare the release or create the pull request is not sufficient.
|
|
56
|
+
4. Confirm the `v`-prefixed tag does not already exist locally or on `origin`.
|
|
57
|
+
5. Create the tag on the recorded merge SHA and push it to `origin`.
|
|
58
|
+
|
|
59
|
+
For example, package version `0.1.29` uses tag `v0.1.29`. Treat release tags as
|
|
60
|
+
immutable; never move or reuse an existing tag. Never substitute the current
|
|
61
|
+
`origin/main` or `HEAD` tip for the release pull request's merge SHA.
|
|
@@ -124,6 +124,8 @@ static ACTIVITY_CTXS: LazyLock<Mutex<HashMap<String, ActivityContext>>>
|
|
|
124
124
|
|
|
125
125
|
Python `ctx.trace_info()` → PyO3 function → looks up Rust context by key → delegates to `ctx.trace()`.
|
|
126
126
|
|
|
127
|
+
Both maps are keyed by an atomic token that is new for every invocation (`act-{n}`, `orch-{n}`), never by `instance_id`: two replays of one instance can be alive in the same process, and each must only reach its own context. Rust passes the orchestration token in `ctxInfo["_ctxToken"]`.
|
|
128
|
+
|
|
127
129
|
## ScheduledTask Protocol
|
|
128
130
|
|
|
129
131
|
Python `OrchestrationContext` methods return dicts with a `"type"` key. Rust deserializes to `ScheduledTask` enum:
|
|
@@ -1,18 +1,51 @@
|
|
|
1
|
-
name: Build
|
|
1
|
+
name: Build & Smoke
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
pull_request:
|
|
5
5
|
push:
|
|
6
6
|
branches: [main]
|
|
7
|
-
release:
|
|
8
|
-
types: [published]
|
|
9
7
|
workflow_dispatch:
|
|
10
8
|
|
|
11
9
|
permissions:
|
|
12
10
|
contents: read
|
|
13
|
-
issues: write # smoke-registry opens an issue on failure
|
|
14
11
|
|
|
15
12
|
jobs:
|
|
13
|
+
tests:
|
|
14
|
+
name: Tests
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
services:
|
|
17
|
+
postgres:
|
|
18
|
+
image: postgres:16
|
|
19
|
+
env:
|
|
20
|
+
POSTGRES_DB: duroxide
|
|
21
|
+
POSTGRES_PASSWORD: postgres
|
|
22
|
+
ports:
|
|
23
|
+
- 5432:5432
|
|
24
|
+
options: >-
|
|
25
|
+
--health-cmd "pg_isready -U postgres -d duroxide"
|
|
26
|
+
--health-interval 10s
|
|
27
|
+
--health-timeout 5s
|
|
28
|
+
--health-retries 5
|
|
29
|
+
env:
|
|
30
|
+
DATABASE_URL: postgresql://postgres:postgres@localhost:5432/duroxide
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
33
|
+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
34
|
+
with:
|
|
35
|
+
python-version: "3.12"
|
|
36
|
+
- name: Install configured Rust toolchain
|
|
37
|
+
run: |
|
|
38
|
+
test -f rust-toolchain.toml
|
|
39
|
+
rustup show active-toolchain
|
|
40
|
+
rustc --version
|
|
41
|
+
- name: Install package and test dependencies
|
|
42
|
+
run: |
|
|
43
|
+
python -m venv .venv
|
|
44
|
+
.venv/bin/python -m pip install --upgrade pip
|
|
45
|
+
.venv/bin/python -m pip install --editable ".[dev]"
|
|
46
|
+
- name: Run tests
|
|
47
|
+
run: .venv/bin/python -m pytest -v
|
|
48
|
+
|
|
16
49
|
# ── macOS (ARM64 + x86_64) ─────────────────────────────────
|
|
17
50
|
macos:
|
|
18
51
|
runs-on: macos-latest
|
|
@@ -24,6 +57,8 @@ jobs:
|
|
|
24
57
|
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
25
58
|
with:
|
|
26
59
|
python-version: "3.12"
|
|
60
|
+
- name: Require Rust toolchain configuration
|
|
61
|
+
run: test -f rust-toolchain.toml
|
|
27
62
|
- name: Build wheel
|
|
28
63
|
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
|
29
64
|
with:
|
|
@@ -50,6 +85,8 @@ jobs:
|
|
|
50
85
|
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
51
86
|
with:
|
|
52
87
|
python-version: "3.12"
|
|
88
|
+
- name: Require Rust toolchain configuration
|
|
89
|
+
run: test -f rust-toolchain.toml
|
|
53
90
|
- name: Build wheel
|
|
54
91
|
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
|
55
92
|
with:
|
|
@@ -84,6 +121,9 @@ jobs:
|
|
|
84
121
|
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
85
122
|
with:
|
|
86
123
|
python-version: "3.12"
|
|
124
|
+
- name: Require Rust toolchain configuration
|
|
125
|
+
shell: bash
|
|
126
|
+
run: test -f rust-toolchain.toml
|
|
87
127
|
- name: Build wheel
|
|
88
128
|
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
|
89
129
|
with:
|
|
@@ -100,6 +140,8 @@ jobs:
|
|
|
100
140
|
runs-on: ubuntu-latest
|
|
101
141
|
steps:
|
|
102
142
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
143
|
+
- name: Require Rust toolchain configuration
|
|
144
|
+
run: test -f rust-toolchain.toml
|
|
103
145
|
- name: Build sdist
|
|
104
146
|
uses: PyO3/maturin-action@e83996d129638aa358a18fbd1dfb82f0b0fb5d3b # v1.51.0
|
|
105
147
|
with:
|
|
@@ -110,7 +152,7 @@ jobs:
|
|
|
110
152
|
name: wheels-sdist
|
|
111
153
|
path: dist/*.tar.gz
|
|
112
154
|
|
|
113
|
-
# ──
|
|
155
|
+
# ── Packaging smoke: install wheel into fresh venv on real OSes ──
|
|
114
156
|
smoke-local:
|
|
115
157
|
name: Smoke (local) ${{ matrix.os }} py${{ matrix.python }}
|
|
116
158
|
needs: [macos, linux, windows]
|
|
@@ -119,17 +161,12 @@ jobs:
|
|
|
119
161
|
strategy:
|
|
120
162
|
fail-fast: false
|
|
121
163
|
matrix:
|
|
122
|
-
|
|
123
|
-
-
|
|
124
|
-
|
|
125
|
-
-
|
|
126
|
-
|
|
127
|
-
-
|
|
128
|
-
shell: bash
|
|
129
|
-
- os: macos-13 # x64
|
|
130
|
-
shell: bash
|
|
131
|
-
- os: windows-latest
|
|
132
|
-
shell: pwsh
|
|
164
|
+
os:
|
|
165
|
+
- ubuntu-latest
|
|
166
|
+
- ubuntu-24.04-arm
|
|
167
|
+
- macos-14 # arm64
|
|
168
|
+
- macos-15-intel # x64
|
|
169
|
+
- windows-latest
|
|
133
170
|
python: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
134
171
|
runs-on: ${{ matrix.os }}
|
|
135
172
|
steps:
|
|
@@ -160,114 +197,15 @@ jobs:
|
|
|
160
197
|
}
|
|
161
198
|
done
|
|
162
199
|
- name: Run smoke (local wheel)
|
|
163
|
-
if:
|
|
200
|
+
if: runner.os != 'Windows'
|
|
164
201
|
env:
|
|
165
202
|
WHEEL_DIR: ${{ github.workspace }}/wheels
|
|
166
203
|
SMOKE_SCRIPT: ${{ github.workspace }}/ci/smoke/smoke.py
|
|
167
204
|
run: bash ci/smoke/run-local.sh
|
|
168
205
|
- name: Run smoke (local wheel, Windows)
|
|
169
|
-
if:
|
|
206
|
+
if: runner.os == 'Windows'
|
|
170
207
|
shell: pwsh
|
|
171
208
|
env:
|
|
172
209
|
WHEEL_DIR: ${{ github.workspace }}/wheels
|
|
173
210
|
SMOKE_SCRIPT: ${{ github.workspace }}/ci/smoke/smoke.py
|
|
174
211
|
run: pwsh ci/smoke/run-local.ps1
|
|
175
|
-
|
|
176
|
-
# ── Publish to PyPI ─────────────────────────────────────────
|
|
177
|
-
publish:
|
|
178
|
-
name: Publish to PyPI
|
|
179
|
-
runs-on: ubuntu-latest
|
|
180
|
-
if: github.event_name == 'release'
|
|
181
|
-
needs: [macos, linux, windows, sdist, smoke-local]
|
|
182
|
-
environment:
|
|
183
|
-
name: pypi
|
|
184
|
-
url: https://pypi.org/p/duroxide
|
|
185
|
-
permissions:
|
|
186
|
-
id-token: write # trusted publishing
|
|
187
|
-
steps:
|
|
188
|
-
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
|
189
|
-
with:
|
|
190
|
-
pattern: wheels-*
|
|
191
|
-
merge-multiple: true
|
|
192
|
-
path: dist
|
|
193
|
-
- name: List wheels
|
|
194
|
-
run: ls -lh dist/
|
|
195
|
-
- name: Publish to PyPI
|
|
196
|
-
uses: pypa/gh-action-pypi-publish@release/v1
|
|
197
|
-
with:
|
|
198
|
-
skip-existing: true
|
|
199
|
-
|
|
200
|
-
# ── Post-publish smoke: install from real PyPI on real OSes ──
|
|
201
|
-
smoke-registry:
|
|
202
|
-
name: Smoke (registry) ${{ matrix.os }} py${{ matrix.python }}
|
|
203
|
-
if: github.event_name == 'release'
|
|
204
|
-
needs: [publish]
|
|
205
|
-
env:
|
|
206
|
-
PIP_ONLY_BINARY: duroxide
|
|
207
|
-
strategy:
|
|
208
|
-
fail-fast: false
|
|
209
|
-
matrix:
|
|
210
|
-
include:
|
|
211
|
-
- os: ubuntu-latest
|
|
212
|
-
shell: bash
|
|
213
|
-
- os: ubuntu-24.04-arm
|
|
214
|
-
shell: bash
|
|
215
|
-
- os: macos-14
|
|
216
|
-
shell: bash
|
|
217
|
-
- os: macos-13
|
|
218
|
-
shell: bash
|
|
219
|
-
- os: windows-latest
|
|
220
|
-
shell: pwsh
|
|
221
|
-
python: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
222
|
-
runs-on: ${{ matrix.os }}
|
|
223
|
-
steps:
|
|
224
|
-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
225
|
-
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
226
|
-
with:
|
|
227
|
-
python-version: ${{ matrix.python }}
|
|
228
|
-
- name: Normalize version (strip leading v)
|
|
229
|
-
id: ver
|
|
230
|
-
shell: bash
|
|
231
|
-
run: |
|
|
232
|
-
V="${{ github.event.release.tag_name }}"
|
|
233
|
-
V="${V#v}"
|
|
234
|
-
echo "version=$V" >> "$GITHUB_OUTPUT"
|
|
235
|
-
- name: Run smoke (registry install)
|
|
236
|
-
if: matrix.shell == 'bash'
|
|
237
|
-
env:
|
|
238
|
-
DUROXIDE_VERSION: ${{ steps.ver.outputs.version }}
|
|
239
|
-
SMOKE_SCRIPT: ${{ github.workspace }}/ci/smoke/smoke.py
|
|
240
|
-
run: bash ci/smoke/run-registry.sh
|
|
241
|
-
- name: Run smoke (registry install, Windows)
|
|
242
|
-
if: matrix.shell == 'pwsh'
|
|
243
|
-
shell: pwsh
|
|
244
|
-
env:
|
|
245
|
-
DUROXIDE_VERSION: ${{ steps.ver.outputs.version }}
|
|
246
|
-
SMOKE_SCRIPT: ${{ github.workspace }}/ci/smoke/smoke.py
|
|
247
|
-
run: pwsh ci/smoke/run-registry.ps1
|
|
248
|
-
|
|
249
|
-
smoke-registry-report:
|
|
250
|
-
name: Report registry smoke failure
|
|
251
|
-
if: github.event_name == 'release' && failure() && needs.smoke-registry.result == 'failure'
|
|
252
|
-
needs: [smoke-registry]
|
|
253
|
-
runs-on: ubuntu-latest
|
|
254
|
-
steps:
|
|
255
|
-
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
256
|
-
with:
|
|
257
|
-
script: |
|
|
258
|
-
const tag = context.payload.release.tag_name;
|
|
259
|
-
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
|
|
260
|
-
await github.rest.issues.create({
|
|
261
|
-
owner: context.repo.owner,
|
|
262
|
-
repo: context.repo.repo,
|
|
263
|
-
title: `Post-publish smoke FAILED for ${tag}`,
|
|
264
|
-
body: [
|
|
265
|
-
`Post-publish (PyPI registry) smoke failed for release \`${tag}\`.`,
|
|
266
|
-
``,
|
|
267
|
-
`Run: ${runUrl}`,
|
|
268
|
-
``,
|
|
269
|
-
`Consumers installing \`duroxide==${tag.replace(/^v/,'')}\` from PyPI may be broken on one or more platforms.`,
|
|
270
|
-
`The release has NOT been auto-yanked. Action: investigate, patch, release a new version, and yank the bad one via PyPI UI if needed.`,
|
|
271
|
-
].join('\n'),
|
|
272
|
-
labels: ['bug', 'release-smoke'],
|
|
273
|
-
});
|
|
@@ -7,6 +7,114 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.1] - 2026-10-12
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **Bumped `duroxide` dependency** — `0.1.30` → `0.1.32` (race fixes and shutdown, below).
|
|
15
|
+
`0.1.31` was reserved and never published.
|
|
16
|
+
- **Bumped `duroxide-pg` dependency** — `0.1.35` → `0.1.36`. Under heavy load, an orchestration
|
|
17
|
+
fetched from PostgreSQL could come with a lock that had already expired. Every ack then failed
|
|
18
|
+
with `Invalid lock token`, and the message was retried for as long as the load lasted. The lock
|
|
19
|
+
now starts when the instance is claimed (migration `0025`). An SDK version built with
|
|
20
|
+
`duroxide-pg` 0.1.35 refuses a database that has this migration.
|
|
21
|
+
- **`runtime.shutdown(timeout_ms)` returns as soon as the runtime stops.** `timeout_ms` (default
|
|
22
|
+
1000) is now the longest it waits for in-flight work before cancelling the rest, not a fixed
|
|
23
|
+
delay. Shutdown also stops every task the runtime started, so no poller keeps a database
|
|
24
|
+
connection open after it returns.
|
|
25
|
+
- **A signal sent to a dropped `wait_for_event` is discarded.** When a `wait_for_event` loses a
|
|
26
|
+
`ctx.race()`, a signal already given to it is no longer handed to a later wait for the same
|
|
27
|
+
event. The later wait receives the next signal. Before, it could receive the stale value, fail
|
|
28
|
+
replay, or wait forever.
|
|
29
|
+
- **A duplicate start does not change a running instance.** `client.start_orchestration()` for
|
|
30
|
+
an instance that already has history is ignored; it can no longer replace the instance's
|
|
31
|
+
orchestration name, version or input. A sub-orchestration whose instance id collides with a
|
|
32
|
+
running instance now fails its parent, as it already did for a finished one.
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
|
|
36
|
+
- **A queue read that loses a race takes no message.** A drain loop that races
|
|
37
|
+
`ctx.dequeue_event()` against a short timer could fail with
|
|
38
|
+
`nondeterministic: history schedule but no emitted action`, skip a message, or read one twice
|
|
39
|
+
when the timer won and a message arrived in the same batch. A dropped read is now cancelled
|
|
40
|
+
where it is dropped, so replay picks the same winners as the first run.
|
|
41
|
+
- **`continue_as_new` carries exactly the unread messages.** A dropped or still-pending read
|
|
42
|
+
counted as a consumer, so a message could be lost at continue-as-new. The runtime now carries
|
|
43
|
+
every message that no read returned (at most 100, as before).
|
|
44
|
+
- **Inputs that arrive while an instance continues as new are kept.** Queue messages, signals
|
|
45
|
+
and cancellation requests that arrived between two executions could be deleted. They now go to
|
|
46
|
+
the next execution.
|
|
47
|
+
- **`ctx.get_kv_all_keys()` and `ctx.prune_kv_values_updated_before()` use key order.** Replay
|
|
48
|
+
could fail with `nondeterministic: kv clear mismatch` after a prune.
|
|
49
|
+
|
|
50
|
+
The queue, signal and continue-as-new changes apply to executions started by `duroxide` 0.1.32
|
|
51
|
+
or later. An execution started by an older runtime keeps the old behaviour until it completes or
|
|
52
|
+
continues as new. See the `duroxide` migration guide for details and rolling upgrades.
|
|
53
|
+
|
|
54
|
+
### Added
|
|
55
|
+
|
|
56
|
+
- `tests/test_races.py` — drain loops that race `ctx.dequeue_event()` against a timer: every
|
|
57
|
+
message arrives once and in order, also across `continue_as_new`.
|
|
58
|
+
- `tests/test_kv_store.py` — KV keys are listed and pruned in key order, and a replayed prune
|
|
59
|
+
matches.
|
|
60
|
+
|
|
61
|
+
## [0.2.0] - 2026-10-04
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
64
|
+
|
|
65
|
+
- **Breaking: `ctx.race()` and `ctx.race_typed()` raise when the winner failed.** Before, a
|
|
66
|
+
winning activity or sub-orchestration that failed came back like a success:
|
|
67
|
+
`{"index": ..., "value": ...}`, with the error text in `value`. Nothing marked it as an
|
|
68
|
+
error. Now the `yield` raises the same exception as yielding that task on its own: same
|
|
69
|
+
type, same message. If the orchestration does not catch it, the orchestration fails.
|
|
70
|
+
- Winners that succeeded, timers, events and dequeued messages return
|
|
71
|
+
`{"index": ..., "value": ...}` as before.
|
|
72
|
+
- Code that read the error text from `value` must catch the exception instead.
|
|
73
|
+
- A race over a task type that `race()` does not support now raises
|
|
74
|
+
`unsupported task in select`. Before, it returned that text as the value.
|
|
75
|
+
- Instances in flight: if a history already holds a race won by a failed task, the replay
|
|
76
|
+
now raises at that race. If the code then takes a different path than the first run did,
|
|
77
|
+
the instance fails. Upgrade when no such instance is running.
|
|
78
|
+
|
|
79
|
+
### Added
|
|
80
|
+
|
|
81
|
+
- **`worker_lock_renewal_buffer_ms`, `session_lock_timeout_ms`,
|
|
82
|
+
`session_lock_renewal_buffer_ms` runtime options** — map to `worker_lock_renewal_buffer`,
|
|
83
|
+
`session_lock_timeout` and `session_lock_renewal_buffer` of the Rust runtime. Keyword
|
|
84
|
+
arguments of `RuntimeOptions`, added after the existing ones. With these, every lock
|
|
85
|
+
timeout and renewal buffer of the runtime can be set from Python.
|
|
86
|
+
- `tests/test_lock_options.py` — checks that every lock option reaches the runtime, from the
|
|
87
|
+
renewal intervals the runtime logs.
|
|
88
|
+
|
|
89
|
+
## [0.1.29] - 2026-10-03
|
|
90
|
+
|
|
91
|
+
### Fixed
|
|
92
|
+
|
|
93
|
+
- **Replays of the same instance no longer share a native context.** The synchronous
|
|
94
|
+
context calls (`ctx.set_kv_value` / `ctx.get_kv_value` and the other KV calls,
|
|
95
|
+
`ctx.set_custom_status` / `ctx.get_custom_status`, and `ctx.trace_*`) found the Rust
|
|
96
|
+
`OrchestrationContext` by instance ID. Two replays of one instance can be alive in the
|
|
97
|
+
same process: a replay that lost its orchestration lock (for example after the process
|
|
98
|
+
stalled for longer than the lock timeout) keeps running until its commit is rejected,
|
|
99
|
+
and another dispatcher slot can fetch the instance again. Calls from one replay then
|
|
100
|
+
reached the other. The replay that held the lock could commit events it never
|
|
101
|
+
produced, and the next replay failed with `nondeterministic: kv set mismatch` or
|
|
102
|
+
`nondeterministic: schedule mismatch`. The context is now looked up by a token that is
|
|
103
|
+
new for every invocation, the same way activity contexts already work.
|
|
104
|
+
|
|
105
|
+
### Changed
|
|
106
|
+
|
|
107
|
+
- **Bumped `duroxide-pg` dependency** — `0.1.34` → `0.1.35`.
|
|
108
|
+
|
|
109
|
+
### Added
|
|
110
|
+
|
|
111
|
+
- **`orchestrator_lock_timeout_ms`, `orchestrator_lock_renewal_buffer_ms`, `max_attempts`
|
|
112
|
+
runtime options** — map to `orchestrator_lock_timeout`, `orchestrator_lock_renewal_buffer`
|
|
113
|
+
and `max_attempts` of the Rust runtime. Keyword arguments of `RuntimeOptions`, added after
|
|
114
|
+
the existing ones.
|
|
115
|
+
- `tests/test_replay_isolation.py` — regression tests that stop the process in the middle
|
|
116
|
+
of a replay for longer than the orchestration lock timeout (POSIX only).
|
|
117
|
+
|
|
10
118
|
## [0.1.28] - 2026-09-03
|
|
11
119
|
|
|
12
120
|
### Changed
|