Files
Alex StanfieldandGitHub 9d79dadafb fix: deduplicate state during V1-to-V2 schedule migration (#9725)
## Summary

Fixes two bugs in the V1-to-V2 (CHASM) schedule migration that produce
corrupt `RecentActions` state:

1. **Duplicate RecentActions entries.** V1's `recordAction` puts the
same workflow in both `RunningWorkflows` and `RecentActions`. The
migration converted both lists independently into `BufferedStart`
entries and concatenated them, creating two entries for the same
workflow execution.

2. **Identical RequestIds for concurrent running workflows.**
`convertRunningWorkflowsToBufferedStarts` generated the same
deterministic `RequestId` for every running workflow (all inputs were
identical). With `ALLOW_ALL` overlap policy, multiple workflows can be
running at migration time

### Changes

- `convertRecentActionsToBufferedStarts` now filters out entries whose
`RunId` matches a `RunningWorkflows` entry, since those are already
converted by `convertRunningWorkflowsToBufferedStarts`.
- `convertRunningWorkflowsToBufferedStarts` now includes the `RunId` in
the `backfillID` tag parameter to `GenerateRequestID`, ensuring each
running workflow gets a unique RequestId.
2026-04-06 14:31:37 -05:00
..