Files
fb0c60e026 Clear StartedClock on activity retry (#10232)
## What

Clear `StartedClock` on activity retry/pause. To do this, refactored the
code that clears per attempt field into a single
`ClearActivityStartedState` helper, and updated all code paths.

## Why

`StartedClock` is a per-attempt field introduced in #9233 to reconstruct
task tokens for cancel worker commands. It was not being cleared when
the activity leaves the started state (retry or pause), leaving a stale
value during backoff. This can cause cancel commands to be unnecessarily
dispatched for activities not currently running on any worker.

## How did you test it?

- Unit tests

---------

Co-authored-by: Hanzo Dev <[email protected]>
2026-05-12 17:14:09 -07:00
..