Skip to content

Conversation

@spkane31
Copy link
Contributor

What changed?

Include transient and speculative WFT events in GetWorkflowExecutionHistoryReponse response, unless UI or CLI made request.

  • Adds transient_or_speculative_events back to GetMutableStateResponse
  • Reserve transient_workflow_task in HisotryCOntinuation token
  • Add validation helpers
  • Add query-compare-query for transient events at request start and end

Re-implements #7732

Why?

Fix "premature end of stream" errors when workers request history after cache eviction w/ transient/speculative workflow tasks present. This adds transient & speculative WFT events in GetWorkflowExecutionHistory (already in PollWorkflowTask). Worker cache eviction w/ speculative workflow tasks causes the expected and actual event counts to be different. #7732 passed transient events through continuation tokens, which could become stale during pagination. This PR implements mutable state at both start and end of pagination and compares transient event IDs to detect if WFT state changed during pagination and return a retryable error.

How did you test it?

  • built
  • run locally and tested manually
  • covered by existing tests
  • added new unit test(s)
  • added new functional test(s)

Potential risks

Same risks from #7732

@spkane31 spkane31 requested review from a team as code owners January 26, 2026 19:00
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.

2 participants