From 96ea0ea9299cbbc82dc584d7beb4ae66e045972a Mon Sep 17 00:00:00 2001 From: 777genius Date: Tue, 19 May 2026 21:14:14 +0300 Subject: [PATCH] fix(team): classify submitted bootstrap diagnostics --- src/renderer/utils/memberLaunchDiagnostics.ts | 12 +++++++++ .../utils/memberLaunchDiagnostics.test.ts | 26 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/src/renderer/utils/memberLaunchDiagnostics.ts b/src/renderer/utils/memberLaunchDiagnostics.ts index 208082cf..a425beef 100644 --- a/src/renderer/utils/memberLaunchDiagnostics.ts +++ b/src/renderer/utils/memberLaunchDiagnostics.ts @@ -388,6 +388,18 @@ function buildDiagnosticHints(input: { 'The teammate process observed bootstrap mail, but local prompt submission did not accept the bootstrap turn.' ); } + if ( + textIncludesAny(text, [ + 'did not bootstrap-confirm', + 'bootstrap-confirm before timeout', + 'bootstrap was not confirmed', + 'last transport stage: bootstrap_submitted', + ]) + ) { + hints.push( + 'Bootstrap prompt was submitted, but teammate did not bootstrap-confirm before timeout.' + ); + } if ( textIncludesAny(text, [ 'did not submit bootstrap prompt', diff --git a/test/renderer/utils/memberLaunchDiagnostics.test.ts b/test/renderer/utils/memberLaunchDiagnostics.test.ts index ea7fb2e0..3875a14a 100644 --- a/test/renderer/utils/memberLaunchDiagnostics.test.ts +++ b/test/renderer/utils/memberLaunchDiagnostics.test.ts @@ -1234,4 +1234,30 @@ describe('member launch diagnostics', () => { 'CLI read empty stdin before bootstrap submit; verify headless teammate runtime flag/env and startup input handling.' ); }); + + it('prioritizes submitted-but-unconfirmed bootstrap over no-stdin stderr noise', () => { + const payload = buildMemberLaunchDiagnosticsPayload({ + teamName: 'signal-ops', + runId: 'run-submitted-no-confirm', + memberName: 'alice', + spawnEntry: { + status: 'error', + launchState: 'failed_to_start', + hardFailure: true, + error: + 'Teammate was registered but did not bootstrap-confirm before timeout. Last transport stage: bootstrap_submitted: messageId=bootstrap-alice-1 Last stderr: Warning: no stdin data received in 3s, proceeding without it.', + updatedAt: '2026-05-19T13:53:36.668Z', + }, + }); + + expect(payload.probableCause).toBe( + 'Bootstrap prompt was submitted, but teammate did not bootstrap-confirm before timeout.' + ); + expect(payload.diagnosticHints?.[0]).toBe( + 'Bootstrap prompt was submitted, but teammate did not bootstrap-confirm before timeout.' + ); + expect(payload.diagnosticHints).toContain( + 'CLI read empty stdin before bootstrap submit; verify headless teammate runtime flag/env and startup input handling.' + ); + }); });