* §5.2 / M2.1 piece 3 — text renderer for `test failure summary`. * One-screen agent-readable triage card, no bundle. Mirrors * `renderFailureContextText`'s top section minus the bundle metadata * (no run id, no codeVersion, no evidence count, no videoUrl) so a * caller running `failure summary`
(s: CliFailureSummary)
| 8282 | * confusing partial bundle. |
| 8283 | */ |
| 8284 | function renderFailureSummaryText(s: CliFailureSummary): string { |
| 8285 | const lines: string[] = []; |
| 8286 | lines.push(`testId: ${s.testId}`); |
| 8287 | lines.push(`status: ${s.status}`); |
| 8288 | if (s.failureKind !== null) lines.push(`failureKind: ${s.failureKind}`); |
| 8289 | lines.push(`snapshotId: ${s.snapshotId}`); |
| 8290 | lines.push( |
| 8291 | `rootCauseHypothesis: ${s.rootCauseHypothesis ?? '— (analysis pipeline produced none)'}`, |
| 8292 | ); |
| 8293 | appendFixTargetLines(lines, s.recommendedFixTarget, 'recommendedFixTarget: '); |
| 8294 | return lines.join('\n'); |
| 8295 | } |
| 8296 | |
| 8297 | /** |
| 8298 | * If every non-null entry shares the same value, return it; otherwise |
no test coverage detected