f67acb2186
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
21 lines
945 B
JavaScript
21 lines
945 B
JavaScript
#!/usr/bin/env node
|
|
/** verdict-outcome-line — чистая строка исхода судьи/наставника для контроллера (Фикс 1). Тотальна. */
|
|
export function buildVerdictOutcomeLine(o) {
|
|
if (!o || typeof o !== 'object') return '';
|
|
const kind = String(o.kind || '');
|
|
if (kind === 'go') return '✅ GO — опечатано';
|
|
if (kind === 'nogo') {
|
|
const t = typeof o.text === 'string' && o.text.trim() ? o.text.trim() : '(без текста)';
|
|
return `🚫 NO-GO: ${t}`;
|
|
}
|
|
if (kind === 'degraded') {
|
|
const r = typeof o.reason === 'string' && o.reason.trim() ? o.reason.trim() : 'причина неизвестна';
|
|
return `⚠ не дозвонился (${r})`;
|
|
}
|
|
if (kind === 'skip') {
|
|
const r = typeof o.reason === 'string' && o.reason.trim() ? o.reason.trim() : 'причина неизвестна';
|
|
return `⏭ пропуск (${r})`;
|
|
}
|
|
return '';
|
|
}
|