René's URL Explorer Experiment


Title: Preserve trailing external events after continue-as-new by andystaples · Pull Request #281 · microsoft/durabletask-python · GitHub

Open Graph Title: Preserve trailing external events after continue-as-new by andystaples · Pull Request #281 · microsoft/durabletask-python

X Title: Preserve trailing external events after continue-as-new by andystaples · Pull Request #281 · microsoft/durabletask-python

Description: Fixes #274 Summary Preserve external events arriving after continue_as_new() instead of delivering them to abandoned waits from the completed execution. This fixes the timer-winning when_any scenario where trailing events in the same batch were lost despite save_events=True. The event-delivery fix follows the finalized-execution approach in the merged microsoft/durabletask-go#163: undelivered events are buffered for carryover, while events already delivered to live waits are not restored. Behavior With save_events=True, undelivered events are carried into the next execution once, preserving global arrival order across event names and retaining raw/null payloads. With save_events=False, they are omitted from carryover. Delivery to a live wait consumes the event, even if the orchestrator never yields that wait or it loses a when_any race. Losing waits are not automatically canceled. Python retains its existing completion boundary: continue_as_new() makes the context terminal at the call; Go finalizes when the orchestrator function returns. Python orchestrators should return immediately after calling continue_as_new(). This change does not interrupt synchronous code, buffered-event consumption, or finally cleanup, and does not alter exception-after-continue behavior. Ordinary external events do not complete abandoned waits after normal completion or termination either. Failed and terminated completions do not carry events forward. An unhandled exception still exits history processing; an exception after continue_as_new() does not override Python's already-terminal status. Entity call/lock responses retain their existing routing. No blanket history-event filter or pending-task cancellation is introduced. Main integration and coverage Merged the latest main and resolved changelog and regression-test conflicts without dropping either set of changes. The PR now includes the global carryover-order fix from #278 and the terminal timer-callback guard from #280. Regression coverage includes both save modes, timer/event winners, replay and new-event processing, multiple same-name waits, explicit cancellation, case-insensitive names, raw/null payloads, already-delivered versus undelivered events, terminal lifecycle behavior, entity responses and unlock retention, and serialized Azure Functions worker responses. Added combined coverage for mixed-name trailing events and their consumption in the next execution. Local validation: 407 affected executor/provider unit tests passed; changed core source passes Pyright; source and test lint passes for all three packages. External-service E2E tests were not run locally; GitHub CI runs against the updated head. Purge discrimination (#276) remains out of scope. Release coordination Unreleased notes are included in all three package changelogs. No package versions or dependency minimums change here. Release the corrected core first, then coordinate provider minimum dependencies in a dedicated release PR.

Open Graph Description: Fixes #274 Summary Preserve external events arriving after continue_as_new() instead of delivering them to abandoned waits from the completed execution. This fixes the timer-winning when_any scenar...

X Description: Fixes #274 Summary Preserve external events arriving after continue_as_new() instead of delivering them to abandoned waits from the completed execution. This fixes the timer-winning when_any scenar...

Opengraph URL: https://github.com/microsoft/durabletask-python/pull/281

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:63678608-5dd9-5929-5801-9b800da659e9
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9E68:180C11:CEF2A8:1209629:6AFE2CCE
html-safe-nonceabf8e1a420720190373657ccd5064ad08add65ec460dfcff78bb63144a7e9599
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTY4OjE4MEMxMTpDRUYyQTg6MTIwOTYyOTo2QUZFMkNDRSIsInZpc2l0b3JfaWQiOiI4MjAxMDkyNDQ0MDcxMDEzNTgyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacd44a05a2005c438e5c780091f9b8fee9b2972489448f03417ce07f70db95b3f7
hovercard-subject-tagpull_request:4680705926
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/microsoft/durabletask-python/pull/281/files
twitter:imagehttps://avatars.githubusercontent.com/u/77818326?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/77818326?s=400&v=4
og:image:altFixes #274 Summary Preserve external events arriving after continue_as_new() instead of delivering them to abandoned waits from the completed execution. This fixes the timer-winning when_any scenar...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned70e31220a67f6376c108d2416fa8e7df854c1065b1672ab7a88ab6dc3a809e2
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/microsoft/durabletask-python git https://github.com/microsoft/durabletask-python.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id627664515
octolytics-dimension-repository_nwomicrosoft/durabletask-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id627664515
octolytics-dimension-repository_network_root_nwomicrosoft/durabletask-python
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseccb88d9c92abe69245b429398c8a57ae87070c7c
ui-targetcanary-1
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/durabletask-python/pull/281/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fdurabletask-python%2Fpull%2F281%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fdurabletask-python%2Fpull%2F281%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=microsoft%2Fdurabletask-python
Reloadhttps://github.com/microsoft/durabletask-python/pull/281/files
Reloadhttps://github.com/microsoft/durabletask-python/pull/281/files
Reloadhttps://github.com/microsoft/durabletask-python/pull/281/files
microsofthttps://github.com/microsoft
durabletask-pythonhttps://github.com/microsoft/durabletask-python
Codehttps://github.com/microsoft/durabletask-python
Issues15 (15)https://github.com/microsoft/durabletask-python/issues
Pull requests12 (12)https://github.com/microsoft/durabletask-python/pulls
Actionshttps://github.com/microsoft/durabletask-python/actions
Projectshttps://github.com/microsoft/durabletask-python/projects
Security and qualityhttps://github.com/microsoft/durabletask-python/security
Insightshttps://github.com/microsoft/durabletask-python/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fmicrosoft%2Fdurabletask-python%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fmicrosoft%2Fdurabletask-python%2Fissues%2Fnew%2Fchoose
andystapleshttps://github.com/andystaples
mainhttps://github.com/microsoft/durabletask-python/tree/main
andystaples-preserve-trailing-external-eventshttps://github.com/microsoft/durabletask-python/tree/andystaples-preserve-trailing-external-events
Conversation 3 https://github.com/microsoft/durabletask-python/pull/281
Commits 3 https://github.com/microsoft/durabletask-python/pull/281/commits
Checks 24 https://github.com/microsoft/durabletask-python/pull/281/checks
Files changed https://github.com/microsoft/durabletask-python/pull/281/files
Please reload this pagehttps://github.com/microsoft/durabletask-python/pull/281/files
Preserve trailing external events after continue-as-new https://github.com/microsoft/durabletask-python/pull/281/files#top
Show all changes 3 commits https://github.com/microsoft/durabletask-python/pull/281/files
b5752cd Preserve trailing external events after continue-as-new andystaples Sep 29, 2026 https://github.com/microsoft/durabletask-python/pull/281/commits/b5752cd9ce41860896ca45bd329c28f7568b56b1
21d18e9 Merge latest main into trailing external event fix andystaples Oct 5, 2026 https://github.com/microsoft/durabletask-python/pull/281/commits/21d18e90c97f1e08ceb6a55e0b21202fb74f3173
7dba8b1 Merge branch 'main' into andystaples-preserve-trailing-external-events berndverst Oct 5, 2026 https://github.com/microsoft/durabletask-python/pull/281/commits/7dba8b1b8c5efd555e07610ac6c8c452bbc2e756
Clear filters https://github.com/microsoft/durabletask-python/pull/281/files
Please reload this pagehttps://github.com/microsoft/durabletask-python/pull/281/files
Please reload this pagehttps://github.com/microsoft/durabletask-python/pull/281/files
CHANGELOG.md https://github.com/microsoft/durabletask-python/pull/281/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
CHANGELOG.md https://github.com/microsoft/durabletask-python/pull/281/files#diff-5238e244f2c6b5bd4ede65c19a2cd928c40ff1a5c28bf1979651e8fe1db1a6d2
CHANGELOG.md https://github.com/microsoft/durabletask-python/pull/281/files#diff-1d1ece375471f083a849ea1b601985661b8bd8e7017fdb7fd5d10e02c4ca69f6
task.py https://github.com/microsoft/durabletask-python/pull/281/files#diff-36492640add0941ee3934088b514e433cd929fa6120e74f93e37e5484bfe7981
worker.py https://github.com/microsoft/durabletask-python/pull/281/files#diff-821cca3b6d2d4c27b83bc2ea2c1dfbce058c46419967498ae26dc12693418899
test_worker_compat.py https://github.com/microsoft/durabletask-python/pull/281/files#diff-c1e9352e0d163ff9852246865936509240b49781a1ba7b85895c0ba9d797c997
test_orchestration_executor.py https://github.com/microsoft/durabletask-python/pull/281/files#diff-3d6b06ac4db653818f8956dc727c6b691775880aca64ddd2e3342c04b8ec0b8e
CHANGELOG.mdhttps://github.com/microsoft/durabletask-python/pull/281/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
View file https://github.com/microsoft/durabletask-python/blob/7dba8b1b8c5efd555e07610ac6c8c452bbc2e756/CHANGELOG.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/durabletask-python/pull/281/{{ revealButtonHref }}
https://github.com/microsoft/durabletask-python/pull/281/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
https://github.com/microsoft/durabletask-python/pull/281/files#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
azure-functions-durable/CHANGELOG.mdhttps://github.com/microsoft/durabletask-python/pull/281/files#diff-5238e244f2c6b5bd4ede65c19a2cd928c40ff1a5c28bf1979651e8fe1db1a6d2
View file https://github.com/microsoft/durabletask-python/blob/7dba8b1b8c5efd555e07610ac6c8c452bbc2e756/azure-functions-durable/CHANGELOG.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/durabletask-python/pull/281/{{ revealButtonHref }}
https://github.com/microsoft/durabletask-python/pull/281/files#diff-5238e244f2c6b5bd4ede65c19a2cd928c40ff1a5c28bf1979651e8fe1db1a6d2
https://github.com/microsoft/durabletask-python/pull/281/files#diff-5238e244f2c6b5bd4ede65c19a2cd928c40ff1a5c28bf1979651e8fe1db1a6d2
durabletask-azuremanaged/CHANGELOG.mdhttps://github.com/microsoft/durabletask-python/pull/281/files#diff-1d1ece375471f083a849ea1b601985661b8bd8e7017fdb7fd5d10e02c4ca69f6
View file https://github.com/microsoft/durabletask-python/blob/7dba8b1b8c5efd555e07610ac6c8c452bbc2e756/durabletask-azuremanaged/CHANGELOG.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/durabletask-python/pull/281/{{ revealButtonHref }}
https://github.com/microsoft/durabletask-python/pull/281/files#diff-1d1ece375471f083a849ea1b601985661b8bd8e7017fdb7fd5d10e02c4ca69f6
https://github.com/microsoft/durabletask-python/pull/281/files#diff-1d1ece375471f083a849ea1b601985661b8bd8e7017fdb7fd5d10e02c4ca69f6
durabletask/task.pyhttps://github.com/microsoft/durabletask-python/pull/281/files#diff-36492640add0941ee3934088b514e433cd929fa6120e74f93e37e5484bfe7981
View file https://github.com/microsoft/durabletask-python/blob/7dba8b1b8c5efd555e07610ac6c8c452bbc2e756/durabletask/task.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/durabletask-python/pull/281/{{ revealButtonHref }}
https://github.com/microsoft/durabletask-python/pull/281/files#diff-36492640add0941ee3934088b514e433cd929fa6120e74f93e37e5484bfe7981
https://github.com/microsoft/durabletask-python/pull/281/files#diff-36492640add0941ee3934088b514e433cd929fa6120e74f93e37e5484bfe7981
durabletask/worker.pyhttps://github.com/microsoft/durabletask-python/pull/281/files#diff-821cca3b6d2d4c27b83bc2ea2c1dfbce058c46419967498ae26dc12693418899
View file https://github.com/microsoft/durabletask-python/blob/7dba8b1b8c5efd555e07610ac6c8c452bbc2e756/durabletask/worker.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/durabletask-python/pull/281/{{ revealButtonHref }}
https://github.com/microsoft/durabletask-python/pull/281/files#diff-821cca3b6d2d4c27b83bc2ea2c1dfbce058c46419967498ae26dc12693418899
https://github.com/microsoft/durabletask-python/pull/281/files#diff-821cca3b6d2d4c27b83bc2ea2c1dfbce058c46419967498ae26dc12693418899
https://github.com/microsoft/durabletask-python/pull/281/files#diff-821cca3b6d2d4c27b83bc2ea2c1dfbce058c46419967498ae26dc12693418899
tests/azure-functions-durable/test_worker_compat.pyhttps://github.com/microsoft/durabletask-python/pull/281/files#diff-c1e9352e0d163ff9852246865936509240b49781a1ba7b85895c0ba9d797c997
View file https://github.com/microsoft/durabletask-python/blob/7dba8b1b8c5efd555e07610ac6c8c452bbc2e756/tests/azure-functions-durable/test_worker_compat.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/microsoft/durabletask-python/pull/281/{{ revealButtonHref }}
https://github.com/microsoft/durabletask-python/pull/281/files#diff-c1e9352e0d163ff9852246865936509240b49781a1ba7b85895c0ba9d797c997
https://github.com/microsoft/durabletask-python/pull/281/files#diff-c1e9352e0d163ff9852246865936509240b49781a1ba7b85895c0ba9d797c997
Please reload this pagehttps://github.com/microsoft/durabletask-python/pull/281/files
Please reload this pagehttps://github.com/microsoft/durabletask-python/pull/281/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.