MCPcopy Create free account
hub / github.com/TestSprite/testsprite-cli / renderFailureSummaryText

Function renderFailureSummaryText

src/commands/test.ts:8284–8295  ·  view source on GitHub ↗

* §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)

Source from the content-addressed store, hash-verified

8282 * confusing partial bundle.
8283 */
8284function 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

Callers 1

runFailureSummaryFunction · 0.85

Calls 1

appendFixTargetLinesFunction · 0.85

Tested by

no test coverage detected