Closed
Description
Task cancellation works by having the task poll the cancellation flag whenever it is convenient to do so. In some cases the convenient times might be separated by a very long interval, so even if the task is cancelled it still runs for a while and appears in the output of the tasks API. Today we don't expose the cancellation flag in the tasks API so users cannot tell whether any given task has already been cancelled, which can be frustrating.
The tasks API should include a "cancelled": true
flag on tasks that have been cancelled.
Splitting this idea out from the more general #67505 to clarify the action needed.