You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python 3.10: cyclic-finalizer replay-clock test fails intermittently on main since #341 #343
Problem. On Python 3.10, tests/test_business_replay_clock.py::test_discard_keeps_generator_context_tokens_and_cannot_borrow_parent_time[cyclic-finalizer] fails intermittently in the full unit suite. Inside the discarded generator's finally block, the parent's clock reads 2026-11-01T00:00:03.123456+00:00 where None is expected. The finalizer that gc.collect() runs is able to read the parent workflow's replay time:
Where it happened. The first failure on main was CI 44334083082 (a9d5c76, the #341 merge). It failed again in the 2.19.0 post-publish registry qualification run 44346536832 at d1c9ecdb, on both attempts, which makes that run's Target branch qualification fail. The activity-retry-cap registry cell passed. The same tree passed every cell in the candidate run 44344537143 at 4e84b0d6, and main CI 44337530564 passed at 88e3075. In a local loop on Python 3.10 (25 runs of the heartbeat and replay-clock files), d1c9ecdb and c513ceeb (2.18.0) both passed every run, so the failure depends on the full suite's GC state or ordering.
Acceptance
Find whether this is a real way for a discarded generator to read its parent's replay time, or only GC timing in the test, and fix the owning side. If it is a product defect, add a replay fixture.
After the fix, the Python 3.10 unit cell passes repeatedly on main. Then repeat the 2.19.0 registry qualification (ci.yml on main, activity_retry_cap=true, retry_cap_artifact_source=registry) to green before selecting Python SDK 2.19.0 as docs stable.
Fixed and delivered.#344 (59dda1f0) makes replay_now() raise ReplayClockUnavailable for clock reads made while a garbage collection runs. Recorded history is unchanged. It shipped in 2.19.1:
PyPI: wheel aef3fe48… and sdist e486193e…, both equal to the approved candidate. Each installs in a clean venv as 2.19.1.
Candidate qualification 44361075509 and registry qualification 44362876623 (main, activity_retry_cap=true, retry_cap_artifact_source=registry) both passed every cell on the first attempt, including Python 3.10. The cyclic-finalizer test had failed both attempts of the 2.19.0 registry run 44346536832.
Activity
Add a replay fixture for clock reads during cyclic collection
Merge pull request #344 from durable-workflow/general/343-gc-finalize…
rmcdaniel commentedon Nov 18, 2026
Fixed and delivered. #344 (
59dda1f0) makesreplay_now()raiseReplayClockUnavailablefor clock reads made while a garbage collection runs. Recorded history is unchanged. It shipped in 2.19.1:83442c9c, giving merge37ec07e6. The annotated tag2.19.1points at the merge. publish.yml 44362544211 passed and created the GitHub release.aef3fe48…and sdiste486193e…, both equal to the approved candidate. Each installs in a clean venv as 2.19.1.main,activity_retry_cap=true,retry_cap_artifact_source=registry) both passed every cell on the first attempt, including Python 3.10. Thecyclic-finalizertest had failed both attempts of the 2.19.0 registry run 44346536832.sdk-python2.19.1.🤖 Generated with Claude Code