mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
## 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.