Repository navigation
Conversation
A notification that arrived while a task ran, or that a subscribe in it was handed, made the transaction close schedule a task that then went through matching. The completion now creates it in its own write and returns it, as it does for a buffered Signal.
Covers a subscribed channel, a linked channel and a subscribe handed the latest: one write for completion, schedule and start, and the task through matching when the worker does not ask.
This was referenced Oct 3, 2026
Owner
Author
|
Paused per the 2026-10-05 design review (the decision record is on the proposal page, section 14). Resumes in phase 2 with the CHASM notification work. The branch stays as a pin. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR hands the task a pending channel notification schedules back with the completion response, instead of sending it through matching.
What changed?
RespondWorkflowTaskCompletedaddsms.HasPendingChannelNotifications()to the conditions that create the next task in the completion. A notification that arrived while the task ran, or that a subscribe in it was handed, gets its task in the same write, started and returned to the worker when the worker asks for one.MutableState.HasPendingChannelNotificationscovers both the subscribed and the linked kind.Part of AI-198 (epic AI-37).
Why?
Before this, the transaction close scheduled the task and matching started it, which costs a second write and a dispatch for every notification that lands mid-task. A buffered Signal already gets handed back inline, so a notification now gets the same path.
How did you test it?
Link to a test plan if any -
I ran the unit tests for
service/history/workflowandrespondworkflowtaskcompleted. The functional tests ran with-tags disable_grpc_modules,test_dep: the three inline handoff cases (a subscribed channel, a linked channel, a subscribe handed the latest), each checking one state transition for completion, schedule and start, plus the notification, linked and activity channel suites unchanged. Lint and theerrortypevet are clean.