Today, core truncates the command sequence sent by lang at the first "terminal" (i.e. workflow-completing) command.
We will change this behavior to instead honor all non-terminal commands, i.e. even when in the command sequence sent by lang they are preceded by a terminal command. In practice, this means moving any terminal commands to the end of the sequence. If there are multiple terminal commands, core will truncate at the first, i.e. respecting the order sent by lang.
The primary motivation for this change is to honor update completions when they occur in the same workflow task as workflow completions.
See https://github.com/temporalio/features/issues/481
Today, core truncates the command sequence sent by lang at the first "terminal" (i.e. workflow-completing) command.
We will change this behavior to instead honor all non-terminal commands, i.e. even when in the command sequence sent by lang they are preceded by a terminal command. In practice, this means moving any terminal commands to the end of the sequence. If there are multiple terminal commands, core will truncate at the first, i.e. respecting the order sent by lang.
The primary motivation for this change is to honor update completions when they occur in the same workflow task as workflow completions.