Commit 55d3844
Add Race, All, Take, Debounce saga effects and gateway tests (#29)
* Add Race, All, Take, Debounce saga effects, fix pipeline bug, add gateway tests (#29)
Expand saga effects from 8 to 12 with Race (first-wins), All (wait-all),
Take (action-waiting), and Debounce (timer-restart). Fix Python 2 exception
syntax in pipeline.py:401. Add 28 gateway tests (previously 0 coverage).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix CI: ruff format, revert pipeline.py to valid 3.14 syntax, add changelog fragment
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix flaky debounce test: increase sleep margins for CI
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix Race effect TOCTOU race on free-threaded Python
On Python 3.14t (no GIL), a child saga could finish between the
per-child done.is_set() for-loop and the all-done check, causing
_execute_race to hit the fallback `return None` path instead of
returning the child's result. Re-check results in the all-done branch.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Address PR review: Take cancel-awareness, waiter cleanup, composable child sagas
- Take effect now polls in short intervals (0.1s) so saga cancellation
can interrupt even indefinite waits, instead of blocking on a single
waiter_event.wait() call.
- Take waiter cleanup now deletes the dict key when the per-action list
becomes empty, preventing unbounded growth of _action_waiters.
- Replaced duplicated effect-stepping logic in _run_saga_capturing with
a yield-from wrapper that delegates to _run_saga, making child sagas
in Race/All fully composable with all effect types (Take, Debounce,
nested Race/All, etc.).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent 19a322e commit 55d3844
7 files changed
Lines changed: 1336 additions & 3 deletions
File tree
- changelog.d
- src/milo
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
154 | 158 | | |
155 | 159 | | |
156 | 160 | | |
| 161 | + | |
157 | 162 | | |
158 | 163 | | |
159 | 164 | | |
| |||
168 | 173 | | |
169 | 174 | | |
170 | 175 | | |
| 176 | + | |
171 | 177 | | |
172 | 178 | | |
173 | 179 | | |
| |||
213 | 219 | | |
214 | 220 | | |
215 | 221 | | |
| 222 | + | |
216 | 223 | | |
217 | 224 | | |
218 | 225 | | |
| |||
225 | 232 | | |
226 | 233 | | |
227 | 234 | | |
| 235 | + | |
228 | 236 | | |
229 | 237 | | |
230 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
272 | 344 | | |
273 | 345 | | |
274 | 346 | | |
| |||
0 commit comments