test(team): cover stalled bootstrap runtime rows

This commit is contained in:
777genius 2026-05-03 13:07:04 +03:00
parent e3c62eb620
commit 69a47fda07

View file

@ -140,6 +140,29 @@ describe('buildTeamRuntimeDisplayRows', () => {
});
});
it('degrades spawn-only rows when online process evidence has stalled bootstrap', () => {
const rows = buildTeamRuntimeDisplayRows({
members: [{ name: 'alice' }],
spawnStatuses: {
alice: createSpawnStatus({
status: 'online',
launchState: 'runtime_pending_bootstrap',
runtimeAlive: true,
bootstrapStalled: true,
runtimeDiagnostic: 'Runtime is alive, but bootstrap did not confirm',
}),
},
});
expect(rows[0]).toMatchObject({
memberName: 'alice',
state: 'degraded',
source: 'spawn-status',
stateReason: 'Runtime is alive, but bootstrap did not confirm',
actionsAllowed: false,
});
});
it('uses explicit spawn status handling without promoting unknown statuses to running', () => {
const rows = buildTeamRuntimeDisplayRows({
members: [{ name: 'alice' }, { name: 'bob' }, { name: 'carol' }],