pub fn summarize_task_failure(
result: &TaskResult,
max_output_lines: usize,
) -> StringExpand description
Build a compact, user-friendly summary for a failed task, including the exit code and the tail of stdout/stderr to help with diagnostics.