1. First gets the latest attempt for each task (using `ROW_NUMBER() OVER (PARTITION BY task_id ORDER BY created_at DESC)`)
2. Only considers non-merged attempts (`WHERE merge_commit IS NULL`)
3. Only shows the failed indicator if the latest attempt has failed
Now the red circle cross will only appear for tasks where the most recent attempt failed, not for any task that has ever had a failed attempt.