Skip to content

Workflow Task Chunking: v2 - #1509

Draft
eamsden wants to merge 3 commits into
mainfrom
eamsden/wft-chunking-v2-rebased
Draft

Workflow Task Chunking: v2#1509
eamsden wants to merge 3 commits into
mainfrom
eamsden/wft-chunking-v2-rebased

Conversation

@eamsden

@eamsden eamsden commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

What was changed

  • Add a v2 logical Workflow Task chunker with explicit event classification, pending-Update handling, complete command-batch lookahead, and pagination-safe deferral.
  • Select v1 or v2 once per run from the first successful Workflow Task completion. Flagless runs stay on v1; they can adopt v2 through Continue-As-New.
  • Keep the writer disabled by default behind TEMPORAL_USE_WFT_CHUNKING_V2; readers honor the durable history selection.
  • Fail tasks with unknown first-completion Core flags instead of silently selecting the wrong chunker.

Why?

The legacy heartbeat heuristic can choose different activation boundaries during live execution and replay, especially when WorkflowExecutionUpdateAccepted follows another command or another history page. That can change workflow-visible time and command production, resulting in nondeterminism.

Checklist

  1. Closes [Bug] Potential NDE on empty WFT followed by WFT with inbound update #1146. Builds on the investigation in Add WFT Chunking v2 #1281.

  2. How was this tested:

    • cargo test -p temporalio-sdk-core --lib
    • TEMPORAL_USE_WFT_CHUNKING_V2=true cargo test -p temporalio-sdk-core --lib
    • cargo lint
    • cargo test-lint
  3. Any docs updates needed?

    • Updated the Workflow Task chunking architecture and rollout document.

@eamsden
eamsden force-pushed the eamsden/wft-chunking-v2-rebased branch 3 times, most recently from d5a7712 to 7fe1e29 Compare August 22, 2026 22:05
@eamsden
eamsden force-pushed the eamsden/wft-chunking-v2-rebased branch from 7fe1e29 to 36e3b75 Compare August 22, 2026 22:10
@eamsden eamsden changed the title Add version-gated workflow task chunking v2 Workflow Task Chunking: v2 Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Potential NDE on empty WFT followed by WFT with inbound update

1 participant