Sometimes artifacts can expire before a task does, e.g to save on storage costs. The problem is that sometimes, the index-search optimization will optimize by replacement with a task who's artifact has expired, and then the dependency who needs it will fail with a 404.
In many cases, it's not clear which artifacts (if any) a dependent needs, so it's impossible to tell whether the existing task is valid or not. But in some cases, (e.g if the dependent declares the artifact via the fetches feature), we at least know that some subset of artifacts are going to be used. In these cases, the index-search optimization should inspect the task definition and ensure that these artifacts will expire sometime after the deadline of the dependent task before it will consider it as a candidate for replacement.