(reasons = [])
| 77 | } |
| 78 | |
| 79 | function formatAutoRunFailureReasons(reasons = []) { |
| 80 | if (!Array.isArray(reasons) || !reasons.length) { |
| 81 | return '未知错误'; |
| 82 | } |
| 83 | |
| 84 | const counts = new Map(); |
| 85 | for (const reason of reasons) { |
| 86 | const normalized = String(reason || '').trim() || '未知错误'; |
| 87 | counts.set(normalized, (counts.get(normalized) || 0) + 1); |
| 88 | } |
| 89 | |
| 90 | return Array.from(counts.entries()) |
| 91 | .map(([reason, count]) => (count > 1 ? `${reason}(${count}次)` : reason)) |
| 92 | .join(';'); |
| 93 | } |
| 94 | |
| 95 | async function logAutoRunFinalSummary(totalRuns, roundSummaries = []) { |
| 96 | const summaries = buildAutoRunRoundSummaries(totalRuns, roundSummaries); |
no outgoing calls
no test coverage detected