fix(team): classify submitted bootstrap diagnostics

This commit is contained in:
777genius 2026-05-19 21:14:14 +03:00
parent caa89b73f9
commit 96ea0ea929
2 changed files with 38 additions and 0 deletions

View file

@ -388,6 +388,18 @@ function buildDiagnosticHints(input: {
'The teammate process observed bootstrap mail, but local prompt submission did not accept the bootstrap turn.' '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 ( if (
textIncludesAny(text, [ textIncludesAny(text, [
'did not submit bootstrap prompt', 'did not submit bootstrap prompt',

View file

@ -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.' '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.'
);
});
}); });