TASK_HISTORY function: Consistent FAILED state for timed-out tasks

Attention

This behavior change is in the 2024_06 bundle.

For the current status of the bundle, refer to Bundle History.

The TASK_HISTORY function behaves as follows:

Before the change:

The tasks that are timed out have inconsistent status in task history. The states for these tasks are sometimes FAILED, and sometimes CANCELED.

After the change:

The timed-out tasks always have a FAILED state in task history.

Ref: 1681