fix(team): require codex process evidence for activity

This commit is contained in:
777genius 2026-05-18 23:41:39 +03:00
parent 962721935d
commit 554112a3d8
2 changed files with 35 additions and 8 deletions

View file

@ -99,6 +99,21 @@ describe('member runtime presentation', () => {
).toBe(false);
});
it('hides Codex native task activity for bootstrap-only runtime evidence without a verified process', () => {
expect(
shouldDisplayMemberCurrentTask({
member: createMember(),
isTeamAlive: true,
...createConfirmedCodexSpawn(),
runtimeEntry: createLiveRuntime({
livenessKind: 'confirmed_bootstrap',
pid: undefined,
rssBytes: undefined,
}),
})
).toBe(false);
});
it('marks stale confirmed Codex native spawn state as non-green runtime status', () => {
const presentation = buildMemberLaunchPresentation({
member: createMember(),
@ -155,6 +170,25 @@ describe('member runtime presentation', () => {
expect(presentation.dotClass).toContain('bg-red-400');
});
it('does not mark bootstrap-only Codex native runtime evidence as green', () => {
const presentation = buildMemberLaunchPresentation({
member: createMember(),
spawnLivenessSource: 'heartbeat',
runtimeAdvisory: undefined,
isTeamAlive: true,
isTeamProvisioning: false,
...createConfirmedCodexSpawn(),
runtimeEntry: createLiveRuntime({
livenessKind: 'confirmed_bootstrap',
pid: undefined,
rssBytes: undefined,
}),
});
expect(presentation.launchVisualState).toBe('stale_runtime');
expect(presentation.dotClass).toContain('bg-red-400');
});
it('does not require runtime evidence for non-Codex teammates', () => {
expect(
shouldDisplayMemberCurrentTask({

View file

@ -993,14 +993,7 @@ function isCodexNativeProcessTeammate(member: ResolvedTeamMember): boolean {
}
function hasLiveRuntimeProcessEvidence(runtimeEntry: TeamAgentRuntimeEntry | undefined): boolean {
if (runtimeEntry?.alive !== true) {
return false;
}
return (
runtimeEntry.livenessKind == null ||
runtimeEntry.livenessKind === 'runtime_process' ||
runtimeEntry.livenessKind === 'confirmed_bootstrap'
);
return runtimeEntry?.alive === true && runtimeEntry.livenessKind === 'runtime_process';
}
function hasSpawnRuntimeLiveClaim({