Canceling a task requests that it stop at a cooperative boundary. The caller still owns the task until its cleanup has finished. Returning immediately after cancel can leave a resource or an unfinished effect behind.
You run an actual cancellation example, then implement deterministic stop, retry and deadline policies. These are separate contracts: canceling owned work, deciding whether to admit work and deciding whether a supplied failure is retryable. A retry limit includes the first attempt. An absolute deadline includes the expected work needed to finish. Keep expected failures narrow rather than catching every exception and hiding a programming error. The cancellation example awaits all owned tasks so the returned event trace includes every finally block.